package created using the webbuild interface [release 1.4.6-1mamba;Sat Feb 01 2025]
This commit is contained in:
parent
40babf8c0e
commit
57f8f47333
@ -1,2 +1,4 @@
|
||||
# opendbx
|
||||
|
||||
OpenDBX is an extremely lightweight but extensible database access library written in C. It provides an abstraction layer to all supported databases with a single, clean and simple interface that leads to an elegant code design automatically.
|
||||
|
||||
|
37
opendbx-1.4.6-c99.patch
Normal file
37
opendbx-1.4.6-c99.patch
Normal file
@ -0,0 +1,37 @@
|
||||
Avoid calling the dbpoll function if it is not declared in the
|
||||
<sybdb.h> header. The freetds version does not declare it by
|
||||
default. This prevents build failures with future compilers that
|
||||
do not support implicit function declarations.
|
||||
|
||||
Submitted upstream:
|
||||
|
||||
<http://bugs.linuxnetworks.de/index.php?do=details&id=44&area=attachments>
|
||||
|
||||
diff --git a/backends/mssql/mssql_basic.c b/backends/mssql/mssql_basic.c
|
||||
index 0506df8f4af3b90c..904a7411a0e3dc80 100644
|
||||
--- a/backends/mssql/mssql_basic.c
|
||||
+++ b/backends/mssql/mssql_basic.c
|
||||
@@ -321,7 +321,9 @@ static int mssql_odbx_result( odbx_t* handle, odbx_result_t** result, struct tim
|
||||
DBPROCESS* cdbproc;
|
||||
|
||||
if( timeout != NULL ) { ms = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; }
|
||||
+#ifdef HAVE_SYBDB_DBPOLL
|
||||
if( dbpoll( dbproc, ms, &cdbproc, &reason ) == FAIL ) { return -ODBX_ERR_BACKEND; }
|
||||
+#endif
|
||||
if( reason != DBRESULT ) { return ODBX_RES_TIMEOUT; } // timeout
|
||||
|
||||
caux->firstresult = 0;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2f74bf8a649c7f4d..d568a3bd53114a40 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -168,6 +168,9 @@ int main() { isc_attach_database( NULL, 0, "", NULL, 0, NULL ); return 0; }
|
||||
[AC_MSG_ERROR([mssql library (libsybdb) not found])]
|
||||
)
|
||||
AC_CHECK_MEMBER([struct dbdaterec.year], [AC_DEFINE([HAVE_LIBSYBDB_MSLIB], 1, [Have mslib type of "struct dbdaterec"])], [], [[#include <sybdb.h>]])
|
||||
+ AC_TRY_COMPILE([#include <sybdb.h>],
|
||||
+ [RETCODE (*dbpoll_ptr) (void) = ((RETCODE (*) (void)) dbpoll)],
|
||||
+ [AC_DEFINE([HAVE_SYBDB_DBPOLL], 1, [dbpoll declared in <sybdb.h>])])
|
||||
odbx_saved_libs=${LIBS}; LIBS=""
|
||||
AC_SEARCH_LIBS([dgettext], [intl], [LIBMSSQL="$LIBMSSQL $LIBS"])
|
||||
LIBS=${odbx_saved_libs}
|
2647
opendbx-1.4.6-doxygen-1.9.1.patch
Normal file
2647
opendbx-1.4.6-doxygen-1.9.1.patch
Normal file
File diff suppressed because it is too large
Load Diff
1047
opendbx-1.4.6-dynamic-exceptions.patch
Normal file
1047
opendbx-1.4.6-dynamic-exceptions.patch
Normal file
File diff suppressed because it is too large
Load Diff
16
opendbx-1.4.6-freetds-fix.patch
Normal file
16
opendbx-1.4.6-freetds-fix.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- opendbx-1.4.6/backends/mssql/mssql_basic.c.orig 2012-05-06 15:59:01.000000000 +0100
|
||||
+++ opendbx-1.4.6/backends/mssql/mssql_basic.c 2014-05-03 14:36:42.450491218 +0100
|
||||
@@ -479,13 +479,8 @@
|
||||
case SYBDATETIMN:
|
||||
if( dbdatecrack( dbproc, &di, (DBDATETIME*) data ) != FAIL )
|
||||
{
|
||||
-#ifdef HAVE_LIBSYBDB_MSLIB
|
||||
gres[i].length = snprintf( (char*) gres[i].value, gres[i].mlen, "%.4ld-%.2ld-%.2ld %.2ld:%.2ld:%.2ld",
|
||||
(long) di.year, (long) di.month+1, (long) di.day, (long) di.hour, (long) di.minute, (long) di.second );
|
||||
-#else
|
||||
- gres[i].length = snprintf( (char*) gres[i].value, gres[i].mlen, "%.4ld-%.2ld-%.2ld %.2ld:%.2ld:%.2ld",
|
||||
- (long) di.dateyear, (long) di.datemonth+1, (long) di.datedmonth, (long) di.datehour, (long) di.dateminute, (long) di.datesecond );
|
||||
-#endif
|
||||
}
|
||||
continue;
|
||||
}
|
200
opendbx.spec
Normal file
200
opendbx.spec
Normal file
@ -0,0 +1,200 @@
|
||||
Name: opendbx
|
||||
Version: 1.4.6
|
||||
Release: 1mamba
|
||||
Summary: An extremely lightweight but extensible database access library
|
||||
Group: Applications/Databases
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://www.linuxnetworks.de/doc/index.php/OpenDBX
|
||||
Source: http://linuxnetworks.de/opendbx/download/opendbx-%{version}.tar.gz
|
||||
Patch0: opendbx-1.4.6-dynamic-exceptions.patch
|
||||
Patch1: opendbx-1.4.6-freetds-fix.patch
|
||||
Patch2: opendbx-1.4.6-doxygen-1.9.1.patch
|
||||
Patch3: opendbx-1.4.6-c99.patch
|
||||
License: LGPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libfbclient
|
||||
BuildRequires: libfreetds-devel
|
||||
BuildRequires: libgcc
|
||||
BuildRequires: libmariadb-devel
|
||||
BuildRequires: libncurses-devel
|
||||
BuildRequires: libpostgresql-devel
|
||||
BuildRequires: libreadline-devel
|
||||
BuildRequires: libsqlite-devel
|
||||
BuildRequires: libstdc++6-devel
|
||||
BuildRequires: libz-devel
|
||||
## AUTOBUILDREQ-END
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description
|
||||
OpenDBX is an extremely lightweight but extensible database access library written in C. It provides an abstraction layer to all supported databases with a single, clean and simple interface that leads to an elegant code design automatically.
|
||||
|
||||
%package -n lib%{name}
|
||||
Group: System/Libraries
|
||||
Summary: Shared libraries for %{name}
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}
|
||||
This package contains shared libraries for %{name}.
|
||||
|
||||
%package -n lib%{name}-firebird
|
||||
Group: System/Libraries
|
||||
Summary: Firebird plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-firebird
|
||||
This package contains the Firebird plugin for %{name}.
|
||||
|
||||
%package -n lib%{name}-mssql
|
||||
Group: System/Libraries
|
||||
Summary: MSSql plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-mssql
|
||||
This package contains the MSSql plugin for %{name}.
|
||||
|
||||
%package -n lib%{name}-mysql
|
||||
Group: System/Libraries
|
||||
Summary: MySQL plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-mysql
|
||||
This package contains the MySql plugin for %{name}.
|
||||
|
||||
%package -n lib%{name}-postgresql
|
||||
Group: System/Libraries
|
||||
Summary: PostgreSQL plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-postgresql
|
||||
This package contains the PostgreSQL plugin for %{name}.
|
||||
|
||||
%package -n lib%{name}-devel
|
||||
Group: Development/Libraries
|
||||
Summary: Development files for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-devel
|
||||
This package contains libraries and header files for developing applications that use %{name}.
|
||||
|
||||
%package -n lib%{name}-sqlite3
|
||||
Group: System/Libraries
|
||||
Summary: SQLite3 plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-sqlite3
|
||||
This package contains the SQLite3 plugin for %{name}.
|
||||
|
||||
%package -n lib%{name}-sybase
|
||||
Group: System/Libraries
|
||||
Summary: SyBase plugin for %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
|
||||
%description -n lib%{name}-sybase
|
||||
This package contains the SyBase plugin for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch 0 -p1 -b .dynamic-exceptions
|
||||
%patch 1 -p1 -b .freetds-fix
|
||||
%patch 2 -p1 -b .doxygen-1.9.1
|
||||
%patch 3 -p1 -b .c99
|
||||
|
||||
# To fix Doxygen parsing issue
|
||||
ln -s api lib/opendbx/api.dox
|
||||
|
||||
# C++ API file must have extension .hpp to be parsed correctly by doxygen
|
||||
cp lib/opendbx/api lib/opendbx/api.hpp
|
||||
|
||||
# regenerate stale libtool files
|
||||
autoreconf -vfi
|
||||
|
||||
# fix hardcoded RPATH issue
|
||||
sed \
|
||||
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
||||
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
||||
-i m4/libtool.m4
|
||||
|
||||
%build
|
||||
export CXXFLAGS="-std=c++14 -Wno-error=incompatible-pointer-types -Wno-error=int-conversion %optflags"
|
||||
export CFLAGS="-Wno-error=incompatible-pointer-types -Wno-error=int-conversion %optflags"
|
||||
|
||||
%configure \
|
||||
--with-backends="mysql pgsql sqlite3 firebird mssql sybase" \
|
||||
--disable-test \
|
||||
--disable-static \
|
||||
CPPFLAGS="-I%{_includedir}/mysql -I%{_includedir}/firebird" \
|
||||
LDFLAGS="-L%{_libdir}/mysql"
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
|
||||
%find_lang %{name} --all-name || touch %{name}.lang
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/odbx-sql
|
||||
%dir %{_datadir}/opendbx
|
||||
%{_datadir}/opendbx/keywords
|
||||
%{_mandir}/man1/odbx-sql.1*
|
||||
|
||||
%files -n lib%{name}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libopendbx.so.*
|
||||
%{_libdir}/libopendbxplus.so.*
|
||||
%doc AUTHORS COPYING
|
||||
|
||||
%files -n lib%{name}-firebird
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libfirebirdbackend.so
|
||||
%{_libdir}/opendbx/libfirebirdbackend.so.*
|
||||
|
||||
%files -n lib%{name}-mssql
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libmssqlbackend.so
|
||||
%{_libdir}/opendbx/libmssqlbackend.so.*
|
||||
|
||||
%files -n lib%{name}-mysql
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libmysqlbackend.so
|
||||
%{_libdir}/opendbx/libmysqlbackend.so.*
|
||||
|
||||
%files -n lib%{name}-postgresql
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libpgsqlbackend.so
|
||||
%{_libdir}/opendbx/libpgsqlbackend.so.*
|
||||
|
||||
%files -n lib%{name}-sqlite3
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libsqlite3backend.so
|
||||
%{_libdir}/opendbx/libsqlite3backend.so.*
|
||||
|
||||
%files -n lib%{name}-sybase
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/opendbx/libsybasebackend.so
|
||||
%{_libdir}/opendbx/libsybasebackend.so.*
|
||||
|
||||
%files -n lib%{name}-devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/odbx.h
|
||||
%{_includedir}/opendbx/api
|
||||
%{_includedir}/opendbx/api.h
|
||||
%{_libdir}/libopendbx.so
|
||||
%{_libdir}/libopendbxplus.so
|
||||
%{_libdir}/pkgconfig/opendbx.pc
|
||||
%{_libdir}/pkgconfig/opendbxplus.pc
|
||||
%{_mandir}/man3/OpenDBX*.3*
|
||||
%{_mandir}/man3/odbx_*.3*
|
||||
%doc ChangeLog NEWS README TODO
|
||||
|
||||
%changelog
|
||||
* Sat Feb 01 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.6-1mamba
|
||||
- package created using the webbuild interface
|
Loading…
x
Reference in New Issue
Block a user