From 40ca66681a182c4a0499992b5e0abcba896adf42 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 23 Sep 2009 20:06:33 +0000 Subject: [PATCH] 2009-09-23 22:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/common/hbffind.c ! do not use GetVolumeInformation() in WinCE builds * harbour/mpkg_rpm.sh * harbour/harbour.spec + added new switches '--with localzlib' '--with localpcre' * updated to work with current base make system TODO: better integration with current base make system --- harbour/ChangeLog | 10 ++++++++ harbour/harbour.spec | 44 +++++++++------------------------ harbour/mpkg_rpm.sh | 14 ++++++++--- harbour/source/common/hbffind.c | 2 ++ 4 files changed, 34 insertions(+), 36 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 05d78494d7..24d77c48bf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-23 22:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/common/hbffind.c + ! do not use GetVolumeInformation() in WinCE builds + + * harbour/mpkg_rpm.sh + * harbour/harbour.spec + + added new switches '--with localzlib' '--with localpcre' + * updated to work with current base make system + TODO: better integration with current base make system + 2009-09-23 17:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbcomp.h * minor formatting diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 749db5d592..02343a96b3 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -18,10 +18,10 @@ # --with fbsql - build hbfbird lib and sddfb for sqlrdd # --with odbc - build hbodbc lib and sddodbc for sqlrdd # --with gd - build hbgd lib -# --with allegro - build GTALLEG - Allegro based GT driver # --with ads - build rddads RDD # --with curl - build hbcurl lib -# --with libharu - build hbhpdf lib +# --with localzlib - build local copy of zlib library +# --with localpcre - build local copy of pcre library # --without nf - do not build nanforum lib # --without gpllib - do not build libs which needs GPL 3-rd party code # --without x11 - do not build GTXWC @@ -77,13 +77,13 @@ %define hb_crs export HB_WITH_CURSES=%{!?_without_gtcrs:yes}%{?_without_gtcrs:no} %define hb_sln export HB_WITH_SLANG=%{!?_without_gtsln:yes}%{?_without_gtsln:no} %define hb_x11 export HB_WITH_X11=%{!?_without_x11:yes}%{?_without_x11:no} +%define hb_local export HB_WITH_ZLIB=%{?_with_localzlib:local} ; HB_WITH_PCRE=%{?_with_localpcre:local} %define hb_bdir export HB_BIN_INSTALL=%{_bindir} %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 hbmzip hbnetio hbtip hbtpathy hbhpdf hbvpdf hbziparc xhb rddsql %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_libharu:hbhpdf} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql} %{?_with_fbsql:hbfbird} %{?_with_allegro:gtalleg}" -%define hb_extrn export HB_EXTERNALLIBS=no -%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_ctrb} ; %{hb_extrn} ; %{hb_cmrc} +%define hb_ctrb export HB_CONTRIBLIBS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmzip hbnetio hbtip hbtpathy hbhpdf hbziparc xhb rddsql %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql} %{?_with_fbsql:hbfbird} %{?_with_allegro:gtalleg}" +%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_local} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_ctrb} ; %{hb_cmrc} %define hb_host www.harbour-project.org %define readme README.RPM ###################################################################### @@ -275,21 +275,6 @@ statikus szerkeszt %{?_with_curl:%{dname} to kompatybilny z językiem CA-Cl*pper kompilator.} %{?_with_curl:Ten pakiet udostępnia statyczn+ biliotekę CURL dla kompilatora %{dname}.} -## libharu library -%{?_with_libharu:%package libharu} -%{?_with_libharu:Summary: hbhpdf libarary for %{dname} compiler} -%{?_with_libharu:Summary(pl): Bilioteka hbhpdf dla kompilatora %{dname}} -%{?_with_libharu:Group: Development/Languages} -%{?_with_libharu:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}} - -%{?_with_libharu:%description libharu} -%{?_with_libharu:%{dname} is a Clipper compatible compiler.} -%{?_with_libharu:This package provides %{dname} hbhpdf library for program linking.} - -%{?_with_libharu:%description -l pl libharu} -%{?_with_libharu:%{dname} to kompatybilny z językiem CA-Cl*pper kompilator.} -%{?_with_libharu:Ten pakiet udostępnia statyczn+ biliotekę hbhpdf dla kompilatora %{dname}.} - ## ADS RDD %{?_with_ads:%package ads} %{?_with_ads:Summary: ADS RDDs for %{dname} compiler} @@ -379,6 +364,8 @@ rm -rf $RPM_BUILD_ROOT %build %{hb_env} +export HB_BUILD_STRIP=all +export HB_BUILD_SHARED=%{!?_with_static:yes} make %{?_smp_mflags} @@ -401,15 +388,14 @@ export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL export HB_BUILD_STRIP=all export HB_BUILD_SHARED=%{!?_with_static:yes} -mkdir -p $HB_BIN_INSTALL -mkdir -p $HB_INC_INSTALL -mkdir -p $HB_LIB_INSTALL - make install %{?_smp_mflags} [ "%{?_with_allegro:1}" ] || rm -f $HB_LIB_INSTALL/libgtalleg.a [ "%{?_without_gtcrs:1}" ] && rm -f $HB_LIB_INSTALL/libgtcrs.a [ "%{?_without_gtsln:1}" ] && rm -f $HB_LIB_INSTALL/libgtsln.a +rm -f $HB_LIB_INSTALL/liblibhpdf.a +rm -f $HB_LIB_INSTALL/liblibpng.a +rm -f $HB_LIB_INSTALL/libsqlite3.a mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 install -m644 doc/man/*.1* $RPM_BUILD_ROOT%{_mandir}/man1/ @@ -608,8 +594,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{name}/libgt*.a %{_libdir}/%{name}/libhblang.a %{_libdir}/%{name}/libhbmacro.a -%{_libdir}/%{name}/libhbpcre.a -%{_libdir}/%{name}/libhbzlib.a %{_libdir}/%{name}/libhbextern.a %{_libdir}/%{name}/libhbnulrdd.a %{_libdir}/%{name}/libhbnortl.a @@ -622,6 +606,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{name}/libhbvmmt.a %{_libdir}/%{name}/libhbusrrdd.a %{_libdir}/%{name}/libhbuddall.a +%{?_with_localzlib:%{_libdir}/%{name}/libhbzlib.a} +%{?_with_localpcre:%{_libdir}/%{name}/libhbpcre.a} %files contrib %defattr(644,root,root,755) @@ -634,7 +620,6 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{name}/libhbct.a %{_libdir}/%{name}/libhbtip*.a %{_libdir}/%{name}/libxhb.a -%{_libdir}/%{name}/libhbvpdf.a %{_libdir}/%{name}/libhbhpdf.a %{_libdir}/%{name}/libhbgt.a %{_libdir}/%{name}/libhbbmcdx.a @@ -654,11 +639,6 @@ rm -rf $RPM_BUILD_ROOT %{?_with_curl:%dir %{_libdir}/%{name}} %{?_with_curl:%{_libdir}/%{name}/libhbcurl.a} -%{?_with_libharu:%files libharu} -%{?_with_libharu:%defattr(644,root,root,755)} -%{?_with_libharu:%dir %{_libdir}/%{name}} -%{?_with_libharu:%{_libdir}/%{name}/libhbhpdf.a} - %{?_with_ads:%files ads} %{?_with_ads:%defattr(644,root,root,755)} %{?_with_ads:%dir %{_libdir}/%{name}} diff --git a/harbour/mpkg_rpm.sh b/harbour/mpkg_rpm.sh index e12d397a66..b6a69fd2be 100755 --- a/harbour/mpkg_rpm.sh +++ b/harbour/mpkg_rpm.sh @@ -21,6 +21,8 @@ # --with ads - build rddads RDD # --with gd - build hbgd lib # --with allegro - build GTALLEG - Allegro based GT driver +# --with localzlib - build local copy of zlib library +# --with localpcre - build local copy of pcre library # --without gpllib - do not build libs which needs GPL 3-rd party code # --without nf - do not build hbnf lib (nanforum lib) # --without x11 - do not build GTXWC @@ -123,10 +125,6 @@ if [ -f /usr/local/ads/acesdk/ace.h ] || [ -f ${HOME}/ads/acesdk/ace.h ] then INST_PARAM="${INST_PARAM} --with ads" fi -if [ -f /usr/include/hpdf.h ] || [ -f /usr/local/include/hpdf.h ] -then - INST_PARAM="${INST_PARAM} --with libharu" -fi if [ "${HB_COMMERCE}" = "yes" ] then INST_PARAM="${INST_PARAM} --without gpllib" @@ -147,6 +145,14 @@ if ! test_reqrpm slang || ! test_reqrpm slang-devel then INST_PARAM="${INST_PARAM} --without gtsln" fi +if [ ! -f /usr/include/zlib.h ] && [ ! -f /usr/local/include/zlib.h ] +then + INST_PARAM="${INST_PARAM} --with localzlib" +fi +if [ ! -f /usr/include/pcre.h ] && [ ! -f /usr/local/include/pcre.h ] +then + INST_PARAM="${INST_PARAM} --with localpcre" +fi TOINST_LST="" for i in ${NEED_RPM} diff --git a/harbour/source/common/hbffind.c b/harbour/source/common/hbffind.c index dc66e8dd9f..577a4ac38b 100644 --- a/harbour/source/common/hbffind.c +++ b/harbour/source/common/hbffind.c @@ -524,6 +524,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) if( ffind->attrmask & HB_FA_LABEL ) { +#if !defined( HB_OS_WIN_CE ) if( ffind->bFirst ) { LPTSTR lpFileMask = HB_TCHAR_CONVTO( ffind->pszFileMask ); @@ -537,6 +538,7 @@ static BOOL hb_fsFindNextLow( PHB_FFIND ffind ) HB_TCHAR_FREE( lpFileMask ); HB_TCHAR_GETFROM( ffind->szName, szName, sizeof( ffind->szName ) - 1 ); } +#endif } else {