summaryrefslogtreecommitdiff
path: root/lib/libalpm/Makefile.am
AgeCommit message (Collapse)Author
2012-04-25libalpm: add pkg-config fileDave Reisner
No one seems to do this "correctly", but for the sake of having an easy method of detecting the presence and version of libalpm on a given system, we provide a straightforward .pc file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-08buildsys: define warning CFLAGS in separate varDave Reisner
Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-08buildsys: cleanup gpgme compile time checkDave Reisner
- handle gpgme libs and cflags separately rather than appending to CFLAGS and LDFLAGS - be consistent in AC_LINK_IFELSE check for gpgme 1.3.0 (though this is irrelephant since we don't actually run) - be consistent with usage of "have" and "with" variables (this actually ends up reducing SLOC) - when voluntary detection fails, unset GPGME_CFLAGS and GPGME_LIBS - when requested support fails the version check, complain about the min version. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-08buildsys: use pkg-config for libcurl detectionDave Reisner
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-08buildsys: use pkg-config for libarchive detectionDave Reisner
This also introduces a versioned dependency of >=2.8.0. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-08buildsys: use pkg-config for openssl detectionDave Reisner
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-21include config.h via MakefilesDave Reisner
Ensures that config.h is always ordered correctly (first) in the includes. Also means that new source files get this for free without having to remember to add it. We opt for -imacros over -include as its more portable, and the added constraint by -imacros doesn't bother us for config.h. This also touches the HACKING file to remove the explicit mention of config.h as part of the includes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15Add sha2 (sha256) routines from PolarSSLDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05lib/rawstr: borrow raw string functions from curlDave Reisner
We'll need these functions to do locale agnostic and case insensitive string comparisons. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-04-27Allow conditional compilation with GPGMEDan McGee
This makes it possible to omit usage of -lgpgme, just as we can do for -lcurl and -lcrypto. Thanks to Rémy Oudompheng for an initial stab at this. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-15Move graph.h functions into graph.cDan McGee
So we only need one copy in the final library, not one copy per time used. Ensure all necessary includes are in place (especially to get the right size of off_t each time it is compiled) by including "config.h" in the new graph.c. One small adjustment here makes the graph_free code more robust- ensure we don't have invalid pointers after each iteration by looking at the parents and children and adjusting accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23buildsys: use libcurl's m4 macro for buildtime detectionDave Reisner
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Integrate GPGME into libalpmDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Add base64 algorithms from PolarSSL to libalpmDan McGee
We will need these for GPG functionality (decoding the base64 encoded signature stored in the databases). Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-02-04Add a hash table for holding packagesAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2010-12-12Prototype disk space checking functionalityAllan McRae
Very basic prototyping for adding functionality to check free disk space before performing package installs. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-14Separate be_files into be_sync and be_localAllan McRae
The file be_files.c is "split" to be_local.c and be_sync.c in order to achieve separate handling of sync and local databases. Some basic clean-up of functions that are only of use for local or sync databases has been performed and some rough function renaming in duplicated code has been performed to prevent compilation errors. However, most of the clean-up and final separation of sync and local db handling occurs in following patches. Signed-off-by: Allan McRae <allan@archlinux.org>
2010-10-13Move the cache stuff where it should beDan McGee
Cache bullshit only has relevance to be_files, so move it there. Signed-off-by: Dan McGee <dan@archlinux.org> [Allan: BIG rebase] Signed-off-by: Allan McRae <allan@archlinux.org>
2010-09-02Use OpenSSL MD5 crypto functions if availableDan McGee
I've noticed my Atom-powered laptop is dog-slow when doing integrity checks on packages, and it turns out our MD5 implementation isn't near as good as that provided by OpenSSL. Using their routines instead provided anywhere from a 1.4x up to a 1.8x performance benefit over our built-in MD5 function. This does not remove the MD5 code from our codebase, but it does enable linking against OpenSSL to get their much faster implementation if it is available on whatever platform you are using. At configure-time, we will default to using it if it is available, but this can be easily changed by using the `--with-openssl` or `--without-openssl` arguments to configure. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Move vercmp code into a separate fileDan McGee
This will facilitate using this object file on its own in the vercmp tool which will be done in a future commit. The net impact on the generated binaries should not be noticeable after this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-11Refactor pkg_load/parse_descfile into a new backend fileDan McGee
alpm_pkg_load() and parse_descfile() are specific to getting information from package files, just as other code is specific to getting information into or out of a package database. Move this code out of package.c, which should eventually only contain operators on the pmpkg_t struct that do not depend at all on where the data came from. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-15Merge branch 'maint'Dan McGee
2008-04-15More non-Linux build updates, mostly DarwinDan McGee
Darwin's binary format does support symbols with differing visibilities, but it does not support the protected or internal visibilities- only hidden. For Darwin only, we should fall back to this visibility to prevent warnings from the compiler and because it is close enough for our library purposes. See http://gcc.gnu.org/viewcvs/*checkout*/trunk/gcc/config/darwin.c, search for the "darwin_assemble_visibility" function for more details. Also add pacman.static.exe to gitignore. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-14Fix gettext on non-Linux platformsDan McGee
Linux includes all the gettext stuff in glibc, so there is no need for the libintl links which we failed to include in our linker variables. Update the makefiles which should enable NLS support on all platforms, including OS X and Cygwin. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-06Remove unnecessary header file, move one macro to util.cDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24Remove pmserver_t abstractionDan McGee
Remove what was a pretty weird abstraction in the libalpm backend. Instead of parsing server URLs as we get them (of which we don't usually use more than a handful anyway), wait until they are actually used, which allows us to store them as a simple string list instead. This allows us to remove a lot of code, and will greatly simplify the continuing refactoring of the download code. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24Move download code out of server.cDan McGee
This is the first in what will be a series of patches to clean up the current download code in libalpm. Start by moving download code out of server.c and into download.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-16Move pmgraph_t struct and functions to their own header fileDan McGee
This will allow us to utilize this helpful type and functions in places besides dependency calculations. In addition, remove the public declaration of pmgraph_t in alpm.h- there is zero need to expose this internal type. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-17Remove provide.c and provide.h .Chantry Xavier
This file only contained one private function : _alpm_db_whatprovides . And the public alpm_db_whatprovides was in db.c , so I moved everything there. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: updated POTFILES.in as well] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04Add some more autoconf macros to filter our CFLAGS usageDan McGee
Hopefully these new autoconf macros, with a little magic, will allow us to compile with any compiler and still choose the options we have available to us. Tested locally with gcc 4.2.2 and gcc 3.4.6; the latter doesn't support two of the items we previously had hardcoded in our CFLAGS. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26Clean up LDADD usageDan McGee
We had a lot of unnecessary overstatements of libraries to include on linking, and autoconf/automake takes care of this for us. This also helps some compilation issues on other platforms. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19Add pmdelta_t structure and functions to libalpm.Nathan Jones
Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-08Update usage of gcc __attribute__ flagsDan McGee
Change the default visibility of libalpm functions to internal instead of hidden- this allows for slightly better optimization because it tells GCC that the function can never be called outside of the current module (see http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html). Also added some attributes to the pacman print functions so that they check the format strings being passed to them. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16Clean up MD5 code.Andrew Fyfe
* Move alpm md5 functions to lib/libalpm/util.c * Remove unneeded includes for md5.h * Replace md5 implementation with one from http://www.xyssl.org Dan: clean up XySSL code by removing parts we don't use, and add a note saying what changed. Dan: fix alpm_get_md5sum, off by one error on the malloc call and other small things. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16Remove support for SHA1 from pacman.Andrew Fyfe
There's no need for a second hashing algorithm. MD5 serves the purpose of verifying that a package file hasn't been corrupted during download. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12Remove versioncmp.{c,h}, clean up selective #ifdefsDan McGee
Remove versioncmp.c by moving all functions to locations that make sense. Move replacement functions (for building without glibc) into util.c where they belong, and do proper checks for them instead of using __sun__, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-01Move Doxygen manpage generation to doc/ directoryDan McGee
Instead of doing the doxygen work in the libalpm/ dir, do it with the rest of the docs in the doc/ dir. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-27Remove lockfile configuration from frontend, make it job of libalpmDan McGee
I previously introduced some patches to make just about every path in pacman/libalpm configurable; doing this with the lockfile seemed a bit too far and we really should just place the lockfile where it belongs- with the DB that needs locking. More details in this thread: http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10Implement simple topological sort algorithm for sortbydepsNagy Gabor
Based on the "depth first search" algorithm, for more infos visit: http://en.wikipedia.org/wiki/Topological_sorting The previous algorithm used by sortbydeps was too slow, and to work around it the number of steps needed to get correct result was reduced greatly. So it produced wrong results in several cases : 1) smoke001.py 2) http://bugs.archlinux.org/task/7229 More here: http://archlinux.org/pipermail/pacman-dev/2007-April/008057.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Fix compilation with GCC 4.2.0Dan McGee
'inline' keyword in C99 is not correctly recognized, so compilation fails on the warning it spits. This fixes this. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Autotool clean up.Andrew Fyfe
* Add vim modeline to Makefile.am and configure.ac * Fix white space in Makefile.am and configure.ac * Add contrib/wget-xdelta.sh to EXTRA_DIST in Makefile.am Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Remove hardcoded defines from libalpmDan McGee
Remove any use of the former path variables defined by the Makefiles or config.h. These are now runtime configurable only with pacman.conf (or by using flags on the command line). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-05-31Move DB and cache dirs away from there dependence on ROOTDIRDan McGee
This change allows us to use all autoconf specified paths, most notably $(localstatedir). It is quite a change and touches a lot of files, as all references to the DB and cache were done with the ROOTDIR as a prefix. * add --lock command-line option to pacman to specify the location of the lockfile (this can now be specified at configure time by setting the $localstatedir path). * Rip quite a few settings out of configure.ac as they are now picked by setting the paths during configure or make. * Fix bug with /tmp fallback for sync downloads not working correctly (related to root location, now the system tmp dir is used). * Simplified the parameters to some libalpm functions, and added get/set for the new lockfile option. * Renamed several of the DEFS to names without the PM_ prefix. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-12* Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to beDan McGee
duplicated. * Updated the util Makefile.am to link with the proper libalpm.la. * Fixed bitmasking issues in be_files.c and db.h. * Rankmirrors updates from James Rosten (with some cleaning up of my own). KeyboardInterrupts are now handled gracefully.
2007-03-11* Fix group comparison issue and associated compilation warnings by usingDan McGee
the alpm strcmp operation which takes void* references. * We had this great visibility patch, but never actually took advantage of it. Added the right compile flag to make it work and added some more SYMEXPORTs where necessary to have a successful compile.
2007-02-22Big commit here, I'll try to cover all the bases.Dan McGee
* Updated all of the language files, as the POT file was updated. NOTE FOR TRANSLATORS, try to base your next contribution off of these, notice how some msgids and messages have been wrapped to the next line- it makes it easier to read anyway. * More Makefile.am/configure.ac updates. 'make dist' and 'make distclean' now work properly, with only one caveat- the automatic testing in distclean doesn't do so hot as it is compiled with a default configure, which includes the fakeroot-proof code (which does not cooperate with pactest). * Added a Makefile.am for the pactest directory.
2007-02-22* A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'Dan McGee
to work as expected.
2007-01-30* Remove -fno-strict-aliasing as it is now unnecessary to compile.Dan McGee
* Fix up add.c a bit better than it was in regards to FS #3492. * Optimized the sqrt call in dependency cycle checking to a single call. * Removal of an outdated comment.
2007-01-29* Fix building outside $(srcdir).Jürgen Hötzel
* Removed ./gen-mirrorlist.sh invocation from configure script: Mirror-files are generated by make, not configure.
2007-01-26Dan McGee <dpmcgee@gmail.com>Aaron Griffin
* Lots of code cleanup, and type fixes * Make 'makeworld' a bit more in-line with the other stuff * Make -Si and -Qi operations appear the same