2002-01-24 Havoc Pennington <hp@redhat.com>

Author: hp
Date: 2002-01-24 23:10:02 GMT
2002-01-24  Havoc Pennington  <hp@redhat.com>

	* pkg.c (print_package_list): make the output halfway attractive

	* autogen.sh: use automake-1.4 aclocal-1.4 if found

	* pkg.c (verify_package): add a warning about -I/usr/include in cflags
This commit is contained in:
Arch Librarian 2005-07-14 13:04:47 +00:00
parent 4722cb5782
commit 5b15d9622b
3 changed files with 59 additions and 8 deletions

View file

@ -1,3 +1,11 @@
2002-01-24 Havoc Pennington <hp@redhat.com>
* pkg.c (print_package_list): make the output halfway attractive
* autogen.sh: use automake-1.4 aclocal-1.4 if found
* pkg.c (verify_package): add a warning about -I/usr/include in cflags
2001-10-28 Havoc Pennington <hp@pobox.com>
* pkg.c: track position of package in the path search order,

View file

@ -21,7 +21,15 @@ DIE=0
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake-1.4
ACLOCAL=aclocal-1.4
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
ACLOCAL=aclocal
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
@ -51,20 +59,22 @@ perl -p -i.bak -e "s/[a-zA-Z0-9]+_DATA/noinst_DATA/g" `find glib-1.2.8 -name Mak
perl -p -i.bak -e "s/info_TEXINFOS/noinst_TEXINFOS/g" `find glib-1.2.8 -name Makefile.am`
perl -p -i.bak -e "s/man_MANS/noinst_MANS/g" `find glib-1.2.8 -name Makefile.am`
(cd glib-1.2.8 && automake)
(cd glib-1.2.8 && $AUTOMAKE)
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo aclocal $ACLOCAL_FLAGS
aclocal $ACLOCAL_FLAGS
libtoolize --copy --force
echo $ACLOCAL $ACLOCAL_FLAGS
$ACLOCAL $ACLOCAL_FLAGS
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
automake -a $am_opt
$AUTOMAKE -a $am_opt
autoconf
cd $ORIGDIR

39
pkg.c
View file

@ -661,6 +661,22 @@ verify_package (Package *pkg)
g_slist_free (requires);
g_slist_free (conflicts);
iter = pkg->I_cflags;
while (iter != NULL)
{
/* we put things in canonical -I/usr/include (vs. -I /usr/include) format,
* but if someone changes it later we may as well be robust
*/
if (strcmp (iter->data, "-I/usr/include") == 0 ||
strcmp (iter->data, "-I /usr/include") == 0)
{
verbose_error ("Package %s has -I/usr/include in Cflags; this may cause problems and is not recommended\n",
pkg->name);
}
iter = iter->next;
}
}
static char*
@ -1196,6 +1212,14 @@ comparison_to_str (ComparisonType comparison)
return "???";
}
static void
max_len_foreach (gpointer key, gpointer value, gpointer data)
{
int *mlen = data;
*mlen = MAX (*mlen, strlen (key));
}
static void
packages_foreach (gpointer key, gpointer value, gpointer data)
{
@ -1203,14 +1227,23 @@ packages_foreach (gpointer key, gpointer value, gpointer data)
if (pkg != NULL)
{
printf ("%s \t\t%s - %s\n",
pkg->key, pkg->name, pkg->description);
char *pad;
pad = g_strnfill (GPOINTER_TO_INT (data) - strlen (pkg->key), ' ');
printf ("%s%s%s - %s\n",
pkg->key, pad, pkg->name, pkg->description);
g_free (pad);
}
}
void
print_package_list (void)
{
g_hash_table_foreach (locations, packages_foreach, NULL);
int mlen = 0;
g_hash_table_foreach (locations, max_len_foreach, &mlen);
g_hash_table_foreach (locations, packages_foreach, GINT_TO_POINTER (mlen + 1));
}