summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/mercury-extras/files/mercury-extras-0.13.1-iodbc.patch')
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.1-iodbc.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.1-iodbc.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-iodbc.patch
new file mode 100644
index 000000000000..0bfaea27f6f7
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.1-iodbc.patch
@@ -0,0 +1,50 @@
+--- mercury-extras-0.13.1.orig/odbc/Mmakefile 2006-04-04 13:49:14.000000000 +1200
++++ mercury-extras-0.13.1/odbc/Mmakefile 2008-08-22 19:26:52.000000000 +1200
+@@ -12,7 +12,7 @@
+ # The driver manager.
+ # Legal values for MODBC_DRIVER are MODBC_IODBC, MODBC_UNIX, and MODBC_MS.
+ # Feel free to add more (and handle them in odbc.m).
+-MODBC_DRIVER=MODBC_UNIX
++MODBC_DRIVER=MODBC_IODBC
+
+ # The database.
+ # Legal values for MODBC_DB are MODBC_MYSQL and MODBC_SQL_SERVER.
+@@ -36,22 +36,25 @@
+ MLLIBS=-lodbc32
+ else
+ #ODBC_LIB_DIR=$(IODBC_DIR)/lib
+- #ODBC_INCL_DIR=$(IODBC_DIR)/include
++ ODBC_CFLAGS=`iodbc-config --cflags`
+
+ # The following are for Debian.
+
+ # for unixODBC
+- MLLIBS=-lodbc -lpthread -lltdl -ldl
++ MLLIBS=`iodbc-config --libs`
+
+ # for iODBC
+ # MLLIBS=-liodbc l-pthread -ldl
+ # note: on a DEC Alpha using OSF1 remove the -ldl.
+ endif
+
+-MAIN_TARGET=odbc_test
++MAIN_TARGET=libodbc
+
+ .PHONY: depend
+-depend: odbc_test.depend
++depend: odbc.depend
++
++.PHONY: install
++install: libodbc.install
+
+ .PHONY: check
+ check:
+@@ -62,7 +65,7 @@
+ # `--no-ansi' is needed because the ODBC header files include C++-style
+ # "//" comments. `--no-ansi' allows recognition of C++-style "//" comments,
+ # presuming you have gcc version 2.7.1 or greater.
+-MGNUCFLAGS=--no-ansi -D$(MODBC_DRIVER) -D$(MODBC_DB) -I$(ODBC_INCL_DIR)
++MGNUCFLAGS=--no-ansi -D$(MODBC_DRIVER) -D$(MODBC_DB) $(ODBC_CFLAGS)
+
+ #-----------------------------------------------------------------------------#
+ #-----------------------------------------------------------------------------#