python-db/python-db.patch

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
parent 313
fc0449ec63bb
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

     1 Index: psycopg2-2.4/psycopg/config.h
     2 diff -Nau psycopg2-2.4psycopg/config.h.orig/ psycopg2-2.4/psycopg/config.h
     3 --- psycopg2-2.4/psycopg/config.h.orig	2011-02-27 12:44:55.000000000 +0100
     4 +++ psycopg2-2.4/psycopg/config.h	2011-03-22 19:19:11.648184363 +0100
     5 @@ -141,10 +141,11 @@
     7  #if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun)
     8  /* what's this, we have no round function either? */
     9 -static double round(double num)
    10 +static double my_round(double num)
    11  {
    12    return (num >= 0) ? floor(num + 0.5) : ceil(num - 0.5);
    13  }
    14 +#define round(num) my_round(num)
    15  #endif
    17  /* postgresql < 7.4 does not have PQfreemem */
    18 Index: psycopg2-2.4/setup.py
    19 diff -Nau psycopg2-2.4/setup.py.orig/ psycopg2-2.4/setup.py
    20 --- psycopg2-2.4/setup.py.orig	2011-02-27 12:46:47.000000000 +0100
    21 +++ psycopg2-2.4/setup.py	2011-03-22 19:36:51.906859031 +0100
    22 @@ -269,6 +269,9 @@
    23                      os.path.join(self.get_pg_config("libdir"), "libpq.a"))
    24          else:
    25              self.libraries.append("pq")
    26 +            self.libraries.append("ssl")
    27 +            self.libraries.append("crypto")
    28 +            self.libraries.append("crypt")
    30          try:
    31              self.library_dirs.append(self.get_pg_config("libdir"))

mercurial