2008-12-27 17:46 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/bin/hb-func.sh
    + added support for rddsql and sdd* libraries in hb* scripts

  * harbour/harbour-win-spec
  * harbour/harbour-wce-spec
    ! added rddnsx library

  * harbour/mpkg_rpm.sh
  * harbour/harbour.spec
    + added harbour-fbird RPM and support for sqlrdd and sdd* libraries

  * harbour/contrib/rddsql/sddpg/Makefile
    + added other paths checking for postgresql header files

  * harbour/contrib/rddsql/sddfb/Makefile
    ! fixed file name

  * harbour/contrib/rddsql/sddpg/pgsqldd.c
  * harbour/contrib/rddsql/sddfb/fbirddd.c
    * cleanup init symbol declaration
    ! casting for C++ compilation
    * added missing const in some char * declarations

  * harbour/contrib/rddsql/sddfb/fbirddd.c
    * changed some parameters passed to firebird functions.
      Mindaugas please verify me because these modifications changes
      the code behavior. I do not know FireBird API and I modified it to
      only pass C++ compilation checking error messages. At least these
      lines should be checked: 233, 236, 244, 245, 260, 261, 440, 445
      If possible please also check casting I added in in other lines
      because it may hide some mistakes.
This commit is contained in:
Przemyslaw Czerpak
2008-12-27 16:44:33 +00:00
parent 9df51fbe3e
commit 94074fac4c
10 changed files with 126 additions and 64 deletions

View File

@@ -8,6 +8,39 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-12-27 17:46 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
+ added support for rddsql and sdd* libraries in hb* scripts
* harbour/harbour-win-spec
* harbour/harbour-wce-spec
! added rddnsx library
* harbour/mpkg_rpm.sh
* harbour/harbour.spec
+ added harbour-fbird RPM and support for sqlrdd and sdd* libraries
* harbour/contrib/rddsql/sddpg/Makefile
+ added other paths checking for postgresql header files
* harbour/contrib/rddsql/sddfb/Makefile
! fixed file name
* harbour/contrib/rddsql/sddpg/pgsqldd.c
* harbour/contrib/rddsql/sddfb/fbirddd.c
* cleanup init symbol declaration
! casting for C++ compilation
* added missing const in some char * declarations
* harbour/contrib/rddsql/sddfb/fbirddd.c
* changed some parameters passed to firebird functions.
Mindaugas please verify me because these modifications changes
the code behavior. I do not know FireBird API and I modified it to
only pass C++ compilation checking error messages. At least these
lines should be checked: 233, 236, 244, 245, 260, 261, 440, 445
If possible please also check casting I added in in other lines
because it may hide some mistakes.
2008-12-27 18:08 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* source/compiler/hbopt.c
+ added logic to generate 'assigned but unused' warning in case

View File

@@ -99,7 +99,7 @@ mk_hbgetlibsctb()
then
libs="$libs gtwin"
fi
echo "$libs rddads hbct hbnf hbmzip hbtip xhb hbgd hbodbc hbpg hbmysql rddado hbwin gtwvg $HB_USR_LIBS"
echo "$libs rddads hbct hbnf hbmzip hbtip xhb hbgd rddsql sddfb sddmy sddpg hbodbc hbpg hbmysql rddado hbwin gtwvg $HB_USR_LIBS"
else
echo "$@"
fi

View File

@@ -19,7 +19,7 @@ ifneq ($(strip $(HB_INC_FIREBIRD_OK)),)
C_USR += $(foreach d, $(HB_INC_FIREBIRD_OK), -I$(d))
C_SOURCES=\
fbsqldd.c \
fbirddd.c \
include $(TOP)$(ROOT)config/lib.cf
else

View File

@@ -1,5 +1,5 @@
/*
* $Id:$
* $Id$
*/
/*
@@ -114,7 +114,7 @@ static void hb_firebirddd_init( void * cargo )
HB_FUNC( SDDFB ) {;}
HB_INIT_SYMBOLS_BEGIN( firebirddd__InitSymbols )
{ "SDDFB", HB_FS_PUBLIC, HB_FUNCNAME( SDDFB ), NULL },
{ "SDDFB", {HB_FS_PUBLIC|HB_FS_LOCAL}, {HB_FUNCNAME( SDDFB )}, NULL },
HB_INIT_SYMBOLS_END( firebirddd__InitSymbols )
HB_CALL_ON_STARTUP_BEGIN( _hb_firebirddd_init_ )
@@ -136,7 +136,7 @@ HB_CALL_ON_STARTUP_END( _hb_firebirddd_init_ )
/* ===================================================================================== */
static USHORT hb_errRT_FireBirdDD( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOsCode )
static USHORT hb_errRT_FireBirdDD( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOsCode )
{
USHORT uiAction;
PHB_ITEM pError;
@@ -220,7 +220,7 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
int iType;
if ( isc_start_transaction ( status, & pTrans, 1, & (isc_db_handle) pArea->pConnection->hConnection, 0, NULL ) )
if ( isc_start_transaction ( status, &pTrans, 1, (isc_db_handle) pArea->pConnection->hConnection, 0, NULL ) )
{
hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_START, "Start transaction failed", NULL, status[ 1 ] );
return FAILURE;
@@ -230,19 +230,19 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
pSqlda->sqln = 1;
pSqlda->version = 1;
if ( isc_dsql_allocate_statement( status, (isc_db_handle) pArea->pConnection->hConnection, & pStmt ) )
if ( isc_dsql_allocate_statement( status, (isc_db_handle*) &pArea->pConnection->hConnection, &pStmt ) )
{
hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_STMTALLOC, "Allocate statement failed", NULL, status[ 1 ] );
isc_rollback_transaction( status, pTrans );
isc_rollback_transaction( status, &pTrans );
hb_xfree( pSqlda );
return FAILURE;
}
if ( isc_dsql_prepare( status, & pTrans, & pStmt, 0, pArea->szQuery, DIALECT, pSqlda ) )
if ( isc_dsql_prepare( status, &pTrans, &pStmt, 0, pArea->szQuery, DIALECT, pSqlda ) )
{
hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_INVALIDQUERY, "Prepare statement failed", pArea->szQuery, status[ 1 ] );
isc_dsql_free_statement( status, pStmt, DSQL_drop );
isc_rollback_transaction( status, pTrans );
isc_dsql_free_statement( status, &pStmt, DSQL_drop );
isc_rollback_transaction( status, &pTrans );
hb_xfree( pSqlda );
return FAILURE;
}
@@ -257,8 +257,8 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
if ( isc_dsql_describe( status, & pStmt, DIALECT, pSqlda ) )
{
hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_STMTDESCR, "Describe statement failed", NULL, status[ 1 ] );
isc_dsql_free_statement( status, pStmt, DSQL_drop );
isc_rollback_transaction( status, pTrans );
isc_dsql_free_statement( status, &pStmt, DSQL_drop );
isc_rollback_transaction( status, &pTrans );
hb_xfree( pSqlda );
return FAILURE;
}
@@ -270,7 +270,7 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
pItemEof = hb_itemArrayNew( uiFields );
pBuffer = ( BYTE * ) hb_xgrab( 256 );
bError = FALSE;
for ( uiCount = 0, pVar = pSqlda->sqlvar; uiCount < uiFields; uiCount++, pVar++ )
{
@@ -279,7 +279,7 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
pFieldInfo.atomName = pBuffer;
pFieldInfo.atomName[ MAX_FIELD_NAME ] = '\0';
hb_strUpper( ( char* ) pFieldInfo.atomName, MAX_FIELD_NAME + 1 );
pFieldInfo.uiDec = 0;
iType = pVar->sqltype & ~1;
@@ -387,8 +387,8 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
/* if ( pFieldInfo.uiType == HB_IT_DOUBLE || pFieldInfo.uiType == HB_IT_INTEGER )
{
pFieldInfo.uiType = HB_IT_LONG;
}
*/
}
*/
if ( ! bError )
bError = ( SELF_ADDFIELD( (AREAP) pArea, &pFieldInfo ) == FAILURE );
}
@@ -396,13 +396,13 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
if ( bError )
break;
}
hb_xfree( pBuffer );
pArea->pResult = pSqlda;
pArea->pStmt = pStmt;
pArea->pTrans = pTrans;
if ( bError )
{
hb_itemClear( pItemEof );
@@ -410,7 +410,7 @@ static ERRCODE fbOpen( SQLBASEAREAP pArea )
hb_errRT_FireBirdDD( EG_CORRUPTION, ESQLDD_INVALIDFIELD, "Invalid field type", pArea->szQuery, 0 );
return FAILURE;
}
pArea->ulRecCount = 0;
pArea->pRow = (void**) hb_xgrab( SQLDD_ROWSET_INIT * sizeof( void* ) );
@@ -437,12 +437,12 @@ static ERRCODE fbClose( SQLBASEAREAP pArea )
}
if ( pArea->pStmt )
{
isc_dsql_free_statement( status, pArea->pStmt, DSQL_drop );
isc_dsql_free_statement( status, &pArea->pStmt, DSQL_drop );
pArea->pStmt = NULL;
}
if ( pArea->pTrans )
{
isc_rollback_transaction( status, pArea->pTrans );
isc_rollback_transaction( status, &pArea->pTrans );
pArea->pTrans = NULL;
}
return SUCCESS;
@@ -460,14 +460,14 @@ static ERRCODE fbGoTo( SQLBASEAREAP pArea, ULONG ulRecNo )
while ( ulRecNo > pArea->ulRecCount && ! pArea->fFetched )
{
lErr = isc_dsql_fetch( status, & pArea->pStmt, DIALECT, pArea->pResult );
lErr = isc_dsql_fetch( status, &pArea->pStmt, DIALECT, (XSQLDA *) pArea->pResult );
if ( lErr == 0 )
{
pArray = hb_itemArrayNew( pArea->uiFieldCount );
for ( ui = 1; ui <= pArea->uiFieldCount; ui++ )
{
pVar = pArea->pResult;
pVar = (XSQLVAR *) pArea->pResult;
pVar += ( ui - 1 );
if ( ( pVar->sqltype & 1 ) && ( * pVar->sqlind < 0 ) )
@@ -528,14 +528,14 @@ static ERRCODE fbGoTo( SQLBASEAREAP pArea, ULONG ulRecNo )
return FAILURE;
}
pArea->pStmt = NULL;
if ( isc_commit_transaction( status, & pArea->pTrans ) )
{
hb_errRT_FireBirdDD( EG_OPEN, ESQLDD_COMMIT, "Transaction commit error", NULL, status[ 1 ] );
return FAILURE;
}
pArea->pTrans = NULL;
hb_xfree( pArea->pResult ); /* TODO: free is more complex */
pArea->pResult = NULL;
@@ -579,7 +579,3 @@ static ERRCODE fbGetVarLen( SQLBASEAREAP pArea, USHORT uiIndex, ULONG * pLength
HB_SYMBOL_UNUSED( pLength );
return SUCCESS;
}

View File

@@ -8,11 +8,11 @@ LIBNAME=sddpg
ifeq ($(HB_INC_PGSQL),)
ifeq ($(HB_XBUILD),)
HB_INC_PGSQL = /usr/include/postgresql
HB_INC_PGSQL = /usr/include /usr/local/pgsql/include /usr/local/pgsql/include/libpq /usr/include/pgsql /usr/include/postgresql /postgres/include
endif
endif
HB_INC_PGSQL_OK += $(foreach d, $(HB_INC_PGSQL), $(if $(wildcard $(d)/libpg-fe.h),$(d),))
HB_INC_PGSQL_OK += $(foreach d, $(HB_INC_PGSQL), $(if $(wildcard $(d)/libpq-fe.h),$(d),))
ifneq ($(strip $(HB_INC_PGSQL_OK)),)

View File

@@ -139,7 +139,7 @@ static void hb_pgsqldd_init( void * cargo )
HB_FUNC( SDDPG ) {;}
HB_INIT_SYMBOLS_BEGIN( sddpostgre__InitSymbols )
{ "SDDPG", HB_FS_PUBLIC, HB_FUNCNAME( SDDPG ), NULL },
{ "SDDPG", {HB_FS_PUBLIC|HB_FS_LOCAL}, {HB_FUNCNAME( SDDPG )}, NULL },
HB_INIT_SYMBOLS_END( sddpostgre__InitSymbols )
HB_CALL_ON_STARTUP_BEGIN( _hb_sddpostgre_init_ )
@@ -161,7 +161,7 @@ HB_CALL_ON_STARTUP_END( _hb_sddpostgre_init_ )
/* ===================================================================================== */
static USHORT hb_errRT_PostgreSQLDD( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, char * szOperation, USHORT uiOsCode )
static USHORT hb_errRT_PostgreSQLDD( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiOsCode )
{
USHORT uiAction;
PHB_ITEM pError;
@@ -182,7 +182,7 @@ static ERRCODE pgsqlConnect( SQLDDCONNECTION* pConnection, PHB_ITEM pItem )
{
PGconn* pConn;
ConnStatusType status;
pConn = PQsetdbLogin( hb_arrayGetCPtr( pItem, 2 ), NULL, NULL, NULL, hb_arrayGetCPtr( pItem, 5 ), hb_arrayGetCPtr( pItem, 3 ), hb_arrayGetCPtr( pItem, 4 ) );
if ( ! pConn ) /* Low memory, etc */
@@ -204,7 +204,7 @@ static ERRCODE pgsqlDisconnect( SQLDDCONNECTION* pConnection )
{
if ( ! pConnection->hConnection )
return FAILURE;
PQfinish( pConnection->hConnection );
PQfinish( (PGconn *) pConnection->hConnection );
return SUCCESS;
}
@@ -222,7 +222,7 @@ static ERRCODE pgsqlExecute( SQLDDCONNECTION* pConnection, PHB_ITEM pItem )
return FAILURE;
}
pResult = PQexec( pConnection->hConnection, szQuery );
pResult = PQexec( (PGconn *) pConnection->hConnection, szQuery );
if ( ! pResult )
{
hb_itemClear( pItem );
@@ -252,10 +252,10 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
BYTE* pBuffer;
DBFIELDINFO pFieldInfo;
pResult = PQexec( pArea->pConnection->hConnection, pArea->szQuery );
pResult = PQexec( (PGconn *) pArea->pConnection->hConnection, pArea->szQuery );
if ( ! pResult )
{
{
hb_errRT_PostgreSQLDD( EG_OPEN, ESQLDD_LOWMEMORY, "Query failed", NULL, 0 ); /* Low memory, etc */
return FAILURE;
}
@@ -271,11 +271,11 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
uiFields = PQnfields( pResult );
SELF_SETFIELDEXTENT( (AREAP) pArea, uiFields );
pItemEof = hb_itemArrayNew( uiFields );
pBuffer = ( BYTE* ) hb_xgrab( 256 );
bError = FALSE;
for ( uiCount = 0; uiCount < uiFields; uiCount++ )
{
@@ -283,9 +283,9 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
pFieldInfo.atomName = ( BYTE* ) pBuffer;
pFieldInfo.atomName[ MAX_FIELD_NAME ] = '\0';
hb_strUpper( ( char* ) pFieldInfo.atomName, MAX_FIELD_NAME + 1 );
pFieldInfo.uiDec = 0;
switch( PQftype( pResult, (int) uiCount ) )
{
case BPCHAROID:
@@ -293,7 +293,7 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
pFieldInfo.uiType = HB_FT_STRING;
pFieldInfo.uiLen = (USHORT) PQfsize( pResult, uiCount ) - 4;
break;
case NUMERICOID:
pFieldInfo.uiType = HB_FT_DOUBLE;
pFieldInfo.uiLen = ( ( PQfsize( pResult, uiCount ) - 4 ) >> 16 ) & 0xFFFF;
@@ -309,12 +309,12 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
pFieldInfo.uiType = HB_FT_INTEGER;
pFieldInfo.uiLen = 11;
break;
case INT8OID:
pFieldInfo.uiType = HB_FT_LONG;
pFieldInfo.uiLen = 20;
break;
case FLOAT4OID:
case FLOAT8OID:
case CASHOID: /* TODO: ??? */
@@ -322,7 +322,7 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
pFieldInfo.uiLen = 16;
pFieldInfo.uiDec = 2; /* TODO: hb_set.SET_DECIMALS ??? */
break;
case BOOLOID:
pFieldInfo.uiType = HB_FT_LOGICAL;
pFieldInfo.uiLen = 1;
@@ -384,7 +384,7 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
break;
}
/* printf( "field:%s \ttype:%d \tsize:%d \tformat:%d \tmod:%d err=%d\n", pBuffer, PQftype( pResult, (int) uiCount ), PQfsize( pResult, uiCount ), PQfformat( pResult, uiCount ) , PQfmod( pResult, uiCount ), bError ); */
if ( ! bError )
{
switch ( pFieldInfo.uiType )
@@ -439,13 +439,13 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
if ( ! bError )
bError = ( SELF_ADDFIELD( (AREAP) pArea, &pFieldInfo ) == FAILURE );
}
if ( bError )
break;
}
hb_xfree( pBuffer );
if ( bError )
{
hb_itemClear( pItemEof );
@@ -453,7 +453,7 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
hb_errRT_PostgreSQLDD( EG_CORRUPTION, ESQLDD_INVALIDFIELD, "Invalid field type", pArea->szQuery, 0 );
return FAILURE;
}
pArea->ulRecCount = (ULONG) PQntuples( pResult );
pArea->pRow = (void**) hb_xgrab( ( pArea->ulRecCount + 1 ) * sizeof( void* ) );
@@ -471,7 +471,7 @@ static ERRCODE pgsqlOpen( SQLBASEAREAP pArea )
static ERRCODE pgsqlClose( SQLBASEAREAP pArea )
{
if ( pArea->pResult )
PQclear( pArea->pResult );
PQclear( (PGresult *) pArea->pResult );
return SUCCESS;
}
@@ -508,11 +508,11 @@ static ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
uiIndex--;
pField = pArea->lpFields + uiIndex;
if ( PQgetisnull( pArea->pResult, pArea->ulRecNo - 1, uiIndex ) )
if ( PQgetisnull( (PGresult *) pArea->pResult, pArea->ulRecNo - 1, uiIndex ) )
return SUCCESS;
pValue = PQgetvalue( pArea->pResult, pArea->ulRecNo - 1, uiIndex );
ulLen = (ULONG) PQgetlength( pArea->pResult, pArea->ulRecNo - 1, uiIndex );
pValue = PQgetvalue( (PGresult *) pArea->pResult, pArea->ulRecNo - 1, uiIndex );
ulLen = (ULONG) PQgetlength( (PGresult *) pArea->pResult, pArea->ulRecNo - 1, uiIndex );
/* printf( "fieldget recno:%d index:%d value:%s len:%d\n", pArea->ulRecNo, uiIndex, pValue, ulLen ); */
@@ -536,7 +536,7 @@ static ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
else
hb_itemPutNLLen( pItem, atol( pValue ), (int) pField->uiLen );
break;
case HB_FT_LOGICAL:
hb_itemPutL( pItem, pValue[ 0 ] == 'T' || pValue[ 0 ] == 'Y' );
break;
@@ -545,7 +545,7 @@ static ERRCODE pgsqlGetValue( SQLBASEAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
case HB_FT_DATE:
{
char szDate[ 9 ];
szDate[ 0 ] = pValue[ 0 ];
szDate[ 1 ] = pValue[ 1 ];
szDate[ 2 ] = pValue[ 2 ];

View File

@@ -309,6 +309,7 @@ rm -fR $RPM_BUILD_ROOT
%{_libdir}/%{name}/librddfpt.a
%{_libdir}/%{name}/librddcdx.a
%{_libdir}/%{name}/librddntx.a
%{_libdir}/%{name}/librddnsx.a
%{_libdir}/%{name}/libgt*.a
%{_libdir}/%{name}/libhblang.a
%{_libdir}/%{name}/libhbmacro.a

View File

@@ -309,6 +309,7 @@ rm -fR $RPM_BUILD_ROOT
%{_libdir}/%{name}/librddfpt.a
%{_libdir}/%{name}/librddcdx.a
%{_libdir}/%{name}/librddntx.a
%{_libdir}/%{name}/librddnsx.a
%{_libdir}/%{name}/libgt*.a
%{_libdir}/%{name}/libhblang.a
%{_libdir}/%{name}/libhbmacro.a

View File

@@ -13,8 +13,9 @@
######################################################################
# Conditional build:
# --with static - link all binaries with static libs
# --with mysql - build hbmysql lib
# --with pgsql - build hbpgsql lib
# --with mysql - build hbmysql lib and sddmy for sqlrdd
# --with pgsql - build hbpgsql lib and sddpg for sqlrdd
# --with fbsql - build hbfbird lib and sddfb for sqlrdd
# --with gd - build hbgd lib
# --with allegro - build GTALLEG - Allegro based GT driver
# --with ads - build rddads RDD
@@ -80,7 +81,7 @@
%define hb_idir export HB_INC_INSTALL=%{_includedir}/%{name}
%define hb_ldir export HB_LIB_INSTALL=%{_libdir}/%{name}
%define hb_cmrc export HB_COMMERCE=%{?_without_gpllib:yes}
%define hb_ctrb export HB_CONTRIBLIBS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmsql hbmzip hbsqlit3 hbtip hbtpathy hbvpdf hbziparc xhb %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_hbhpdf:hbhpdf} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql} %{?_with_allegro:gtalleg}"
%define hb_ctrb export HB_CONTRIBLIBS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmsql hbmzip hbsqlit3 hbtip hbtpathy hbvpdf hbziparc xhb rddsql %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_hbhpdf:hbhpdf} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql} %{?_with_fbsql:hbfbird} %{?_with_allegro:gtalleg}"
%define hb_env %{hb_arch} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_ctrb} ; %{hb_cmrc}
%define hb_host www.harbour-project.org
%define readme README.RPM
@@ -333,6 +334,21 @@ statikus szerkeszt
%{?_with_pgsql:%{dname} to kompatybilny z jêzykiem CA-Cl*pper kompilator.}
%{?_with_pgsql:Ten pakiet udostêpnia statyczn± biliotekê PGSQL dla kompilatora %{dname}.}
## fbird library
%{?_with_fbsql:%package fbird}
%{?_with_fbsql:Summary: FireBird libarary for %{dname} compiler}
%{?_with_fbsql:Summary(pl): Bilioteka FireBird dla kompilatora %{dname}}
%{?_with_fbsql:Group: Development/Languages}
%{?_with_fbsql:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_fbsql:%description fbird}
%{?_with_fbsql:%{dname} is a Clipper compatible compiler.}
%{?_with_fbsql:This package provides %{dname} FireBird library for program linking.}
%{?_with_fbsql:%description -l pl fbird}
%{?_with_fbsql:%{dname} to kompatybilny z jêzykiem CA-Cl*pper kompilator.}
%{?_with_fbsql:Ten pakiet udostêpnia statyczn± biliotekê FireBird dla kompilatora %{dname}.}
## gd library
%{?_with_gd:%package gd}
%{?_with_gd:Summary: GD libarary for %{dname} compiler}
@@ -646,6 +662,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/%{name}/libhbgt.a
%{_libdir}/%{name}/libhbbmcdx.a
%{_libdir}/%{name}/libhbclipsm.a
%{_libdir}/%{name}/librddsql.a
%{_libdir}/%{name}/libhbmsql.a
%{_libdir}/%{name}/libhbsqlit3.a
%{_libdir}/%{name}/libhbtpathy.a
@@ -681,11 +698,19 @@ rm -rf $RPM_BUILD_ROOT
%{?_with_mysql:%defattr(644,root,root,755)}
%{?_with_mysql:%dir %{_libdir}/%{name}}
%{?_with_mysql:%{_libdir}/%{name}/libhbmysql.a}
%{?_with_mysql:%{_libdir}/%{name}/libsddmy.a}
%{?_with_pgsql:%files pgsql}
%{?_with_pgsql:%defattr(644,root,root,755)}
%{?_with_pgsql:%dir %{_libdir}/%{name}}
%{?_with_pgsql:%{_libdir}/%{name}/libhbpgsql.a}
%{?_with_pgsql:%{_libdir}/%{name}/libsddpg.a}
%{?_with_fbsql:%files fbird}
%{?_with_fbsql:%defattr(644,root,root,755)}
%{?_with_fbsql:%dir %{_libdir}/%{name}}
%{?_with_fbsql:%{_libdir}/%{name}/libhbfbird.a}
%{?_with_fbsql:%{_libdir}/%{name}/libsddfb.a}
%{?_with_gd:%files gd}
%{?_with_gd:%defattr(644,root,root,755)}

View File

@@ -14,8 +14,9 @@
######################################################################
# Conditional build:
# --with static - link all binaries with static libs
# --with mysql - build hbmysql lib
# --with pgsql - build hbpgsql lib
# --with mysql - build hbmysql lib and sddmy for sqlrdd
# --with pgsql - build hbpgsql lib and sddpg for sqlrdd
# --with fbsql - build hbfbird lib and sddfb for sqlrdd
# --with gd - build hbgd lib
# --with allegro - build GTALLEG - Allegro based GT driver
# --with ads - build rddads RDD
@@ -81,6 +82,7 @@ do
[ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixODBC-devel"
fi
[ "$1" = "pgsql" ] && NEED_RPM="${NEED_RPM} postgresql-devel"
[ "$1" = "fbsql" ] && NEED_RPM="${NEED_RPM} firebird-devel"
[ "$1" = "allegro" ] && NEED_RPM="${NEED_RPM} allegro-devel"
fi
fi
@@ -96,6 +98,10 @@ if test_reqrpm "postgresql-devel"
then
INST_PARAM="${INST_PARAM} --with pgsql"
fi
if test_reqrpm "firebird-devel"
then
INST_PARAM="${INST_PARAM} --with fbsql"
fi
if test_reqrpm "gd-devel"
then
v=`rpm -q gd|sed -e "s/[^0-9]*\([0-9]*\).*/\1/g"`