[weasel-commit] Source: unixODBC=2.2.12-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Sun, 31 Jan 2010 13:50:54 -0500

================================
unixODBC:source=2.2.12-1
cvc rdiff unixODBC -1 /weasel.rpath.org@wgl:3-devel/2.2.12-1
================================
2.2.12-1 Filip Brcic (brcha@xxxxxxx) Sun Jan 31 13:50:42 2010
    Automatic promote by rBuild.

unixODBC.recipe: new
--- /dev/null
+++ unixODBC.recipe
@@ -0,0 +74 @@
+#
+# Copyright (c) 2004-2006 rPath, Inc.
+# Copyright (c) 2007,2008 Filip Brcic <brcha@xxxxxxx>
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+class UnixODBC(AutoPackageRecipe):
+    name = 'unixODBC'
+    version = '2.2.12'
+
+    buildRequires = [
+        'bison:runtime', 'flex:devel', 'flex:runtime', 'gettext:runtime',
+        'intltool:runtime', 'libtool:devel', 'readline:devel',
+        ]
+    
+    if Arch.x86_64:
+        buildRequires.extend(['multiarch_wrapper:runtime'])
+
+    extraConfig = (
+        ' --enable-ltdllib'
+        ' --enable-fdb'
+        ' --disable-gui' # until qt3 is built which might be a while
+        )
+
+    def unpack(r):
+        r.addArchive('http://www.unixodbc.org/%(name)s-%(version)s.tar.gz')
+
+        r.Replace('void yyerror', """#define YY_FLUSH_BUFFER
+
+void yyerror""", 'sqp/lex.l')
+
+        if Arch.x86_64:
+            # First build 32bit version
+            macros32 = r.macros.copy()
+            macros32.cc = '"gcc -m32"'
+            macros32.cxx = '"g++ -m32"'
+            macros32.libdir = '%(prefix)s/lib'
+
+            r.Run('cp -a %(builddir)s %(builddir)s/../32bit')
+            
+            r.Configure(r.extraConfig, dir='../32bit', overrideMacros=macros32,
+                        preConfigure='USE_ARCH=32')
+            r.Run("sed -i 's@^LDFLAGS.*=@& ../libltdl/.libs/libltdlc.a -ldl@' 
../32bit/exe/Makefile")
+            r.Make(dir='../32bit', overrideMacros=macros32, 
preMake='USE_ARCH=32')
+            r.MakeInstall(dir='../32bit', overrideMacros=macros32, 
preMake='USE_ARCH=32')
+
+            r.Move('%(bindir)s/odbc_config', '%(bindir)s/odbc_config-32')
+            r.ComponentSpec('devel', '%(bindir)s/odbc_config-32')
+
+    def configure(r):
+        r.Configure(r.extraConfig)
+        r.Run("sed -i 's@^LDFLAGS.*=@& ../libltdl/.libs/libltdlc.a -ldl@' 
exe/Makefile")
+        if Arch.x86_64:
+            r.Run('sed -i -e "/sys_lib_search_path_spec=/s@/lib@&64@g" \
+       -e "/sys_lib_dlsearch_path_spec=/s@/lib@&64@g" libtool')
+        
+    def policy(r):
+        if Arch.x86_64:
+            r.Move('%(bindir)s/odbc_config', '%(bindir)s/odbc_config-64')
+            r.ComponentSpec('devel', '%(bindir)s/odbc_config-64')
+            r.Symlink('%(bindir)s/multiarch_wrapper', '%(bindir)s/odbc_config')
+            r.DanglingSymlinks(exceptions='%(bindir)s/odbc_config')
+        r.ComponentSpec('devel', '%(bindir)s/odbc_config')
+        
+        r.AutoDoc(exceptions='/.+/')
+
+        for dir in (
+            'AdministratorManual', 'UserManual', 'lst',
+            'ProgrammerManual', 'ProgrammerManual/Tutorial'
+        ):
+            r.Doc('doc/'+dir+'/*.{html,gif,vsd,sql,css}', dir=dir)
+
+        r.ExcludeDirectories(exceptions='%(sysconfdir)s/ODBCDataSources')

unixODBC-2.2.12.tar.gz: new
unixODBC-flush_buffer-fix-1.patch: new
--- /dev/null
+++ unixODBC-flush_buffer-fix-1.patch
@@ -0,0 +12 @@
+diff -Naur unixODBC-2.2.12.orig/sqp/lex.l unixODBC-2.2.12/sqp/lex.l
+--- unixODBC-2.2.12.orig/sqp/lex.l     2005-10-12 10:20:04.000000000 +0200
++++ unixODBC-2.2.12/sqp/lex.l  2009-09-29 14:14:59.526619760 +0200
+@@ -46,6 +46,8 @@
+  * message and deposits it in a usefull place.
+  *
+  **********************************************************************/
++#define YY_FLUSH_BUFFER
++
+ void yyerror( char *s )
+ {
+       sprintf( g_szError, "%s processing '%s' on line %d", s, yytext, 
g_nLineNo );


Committed by: brcha

Other related posts:

  • » [weasel-commit] Source: unixODBC=2.2.12-1 - rbuilder