ports/136002: py-odbc build now respects PREFIX

Robert Kruus rob.kruus at gmail.com
Wed Jun 24 15:40:04 UTC 2009


>Number:         136002
>Category:       ports
>Synopsis:       py-odbc build now respects PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 24 15:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Robert Kruus
>Release:        FREEBSD 7.2 amd64
>Organization:
>Environment:
FreeBSD 412039H.gos.ca 7.2-RELEASE FreeBSD 7.2-RELEASE #4: Wed May 20 11:39:05 CST 2009     root at 412039H.gos.ca:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The new patch file now respects PREFIX to build in non-standard locations.  Replaces the current patch in the py-odbc/files directory.

See:
http://qat.tecnik93.com/index.php?action=list_buildports&build=7-STABLE-FPT-NPD&search_port_name=py-odbc
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- setup.py.orig	2009-04-15 14:10:36.000000000 -0600
+++ setup.py	2009-06-24 09:15:04.203757061 -0600
@@ -54,8 +54,16 @@
     else:
         # Other posix-like: Linux, Solaris, etc.
 
+        try:
+            include = '-I'+os.environ['PREFIX']+'/include'
+            lib = '-L'+os.environ['PREFIX']+'/lib'
+        except:
+            include = '-I/usr/local/include'
+            lib = '-L/usr/local/lib'
+
         # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
-        extra_compile_args = ['-Wno-write-strings']
+        extra_compile_args = ['-Wno-write-strings', include, lib]
+        extra_link_args = [ lib ]
 
         # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
         libraries.append('odbc')


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list