diff --git a/ChangeLog.txt b/ChangeLog.txt index f92ea06973..54edb725e1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,35 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2017-09-13 18:04 UTC Viktor Szakats (vszakats users.noreply.github.com) + * contrib/hbrun/hbrun.hbp + * ChangeLog.txt + * package/harbour-wce.spec.in + * package/harbour-win.spec.in + * package/harbour.spec + * package/mpkg_rpm_wce.sh + * package/mpkg_rpm_win.sh + * package/mpkg_rpm.sh + * package/mpkg_src.sh + * package/mpkg_ver.sh + * package/mpkg_win.nsi + * package/winuni/mpkg_win_uni.nsi + * utils/hbmk2/hbmk2.hbp + * utils/hbmk2/hbmk2.prg + * utils/hbmk2/Makefile + * package/harb_osx.icns -> package/harbour.icns + * package/harb_win.ico -> package/harbour.ico + * package/harb_win.mft -> package/harbour.mft + * package/harb_win.rc -> package/harbour.rc + * utils/hbmk2/hbmk2.rc -> utils/hbmk2/harbour.rc + * sync more file renames with the 3.4 fork + NOTE: some projects used to rely on harb_win.ico. This will + not work anymore and these will need to be updated or even + better fixed to rely on it local .ico file instead. + * sync bash formatting and fixes. Formatting guidelines here + https://google.github.io/styleguide/shell.xml + * sync two hbmk2 macro names + 2017-09-13 17:02 UTC Viktor Szakats (vszakats users.noreply.github.com) * config/dyn.mk * sync a missed variable rename diff --git a/contrib/hbrun/hbrun.hbp b/contrib/hbrun/hbrun.hbp index aa08ee9247..3677e9c4bb 100644 --- a/contrib/hbrun/hbrun.hbp +++ b/contrib/hbrun/hbrun.hbp @@ -2,7 +2,7 @@ -o${hb_name} --DHBMK_WITH_ALL_EMBEDDED_HEADERS +-DHBMK_WITH_BUILTIN_HEADERS_ALL -DHBMK_WITH_GTXWC{HBMK_WITH_GTXWC='yes'} -gtxwc{HBMK_WITH_GTXWC='yes'} diff --git a/package/harbour-wce.spec.in b/package/harbour-wce.spec.in index 8414ea806a..74d6ccfb78 100644 --- a/package/harbour-wce.spec.in +++ b/package/harbour-wce.spec.in @@ -87,7 +87,7 @@ make %{?_smp_mflags} %install -# Install harbour itself. +# Install Harbour itself. unset HB_COMPILER diff --git a/package/harbour-win.spec.in b/package/harbour-win.spec.in index 4ede3373b8..8d2eed9e2e 100644 --- a/package/harbour-win.spec.in +++ b/package/harbour-win.spec.in @@ -87,7 +87,7 @@ make %{?_smp_mflags} %install -# Install harbour itself. +# Install Harbour itself. unset HB_COMPILER diff --git a/package/harb_osx.icns b/package/harbour.icns similarity index 100% rename from package/harb_osx.icns rename to package/harbour.icns diff --git a/package/harb_win.ico b/package/harbour.ico similarity index 100% rename from package/harb_win.ico rename to package/harbour.ico diff --git a/package/harb_win.mft b/package/harbour.mft similarity index 100% rename from package/harb_win.mft rename to package/harbour.mft diff --git a/package/harb_win.rc b/package/harbour.rc similarity index 94% rename from package/harb_win.rc rename to package/harbour.rc index 3a0b982cda..61af165b14 100644 --- a/package/harb_win.rc +++ b/package/harbour.rc @@ -1,7 +1,4 @@ -/* - * Copyright 2011 Viktor Szakats (vszakats.net/harbour) - * See COPYING.txt for licensing terms. - */ +/* Copyright 2011 Viktor Szakats (vszakats.net/harbour) */ #include "hbver.h" diff --git a/package/harbour.spec b/package/harbour.spec index 756129794d..66869b1738 100644 --- a/package/harbour.spec +++ b/package/harbour.spec @@ -25,19 +25,19 @@ # please add your distro suffix if it does not belong to the ones recognized below # and remember that order checking can be important -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' mandriva-release-common 2>/dev/null) && echo "mdv$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' mandriva-release-common 2>/dev/null) && echo "mdv$release" | tr -d '.') %if "%{platform}" == "" -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' fedora-release 2>/dev/null) && echo "fc$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' fedora-release 2>/dev/null) && echo "fc$release" | tr -d '.') %if "%{platform}" == "" -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' centos-release 2>/dev/null) && echo "el$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' centos-release 2>/dev/null) && echo "el$release" | tr -d '.') %if "%{platform}" == "" -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' suse-release 2>/dev/null) && echo "sus$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' suse-release 2>/dev/null) && echo "sus$release" | tr -d '.') %if "%{platform}" == "" -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' openSUSE-release 2>/dev/null) && echo "sus$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' openSUSE-release 2>/dev/null) && echo "sus$release" | tr -d '.') %if "%{platform}" == "" -%define platform %(release=$(rpm -q --queryformat='%{VERSION}' redhat-release 2>/dev/null) && echo "rh$release"|tr -d ".") +%define platform %(release=$(rpm -q --queryformat='%{VERSION}' redhat-release 2>/dev/null) && echo "rh$release" | tr -d '.') %if "%{platform}" == "" -%define platform %([ -f /etc/pld-release ] && cat /etc/pld-release|sed -e '/1/ !d' -e 's/[^0-9]//g' -e 's/^/pld/') +%define platform %([ -f /etc/pld-release ] && cat /etc/pld-release | sed -e '/1/ !d' -e 's/[^0-9]//g' -e 's/^/pld/') %if "%{platform}" == "" %undefine platform %endif @@ -91,7 +91,7 @@ Summary: Free software Clipper compatible compiler Summary(pl): Darmowy kompilator kompatybilny z językiem Clipper. Summary(pt_BR): Um compilador Clipper compativel Gratis -Summary(ru): ????????? ??????????, ??????????? ? ?????? Clipper. +Summary(ru): Свободный компилятор, совместимый с языком Clipper. Summary(hu): Szabad szoftver Clipper kompatibilis fordító Name: %{name} Version: %{version} @@ -123,9 +123,9 @@ Esse pacote contem um compilador, um pré-processador, arquivos de cabeçalho uma maquina virtual e documentaçăo. %description -l ru -%{dname} - ?????????????????? ??????????, ??????????? ? ?????? CA-Cl*pper. -???? ????? ???????? ??????????, ????????????, ????? ??????????, ??????????? -?????? ? ????????????. +%{dname} - многоплатформенный компилятор, совместимый с языком CA-Cl*pper. +Этот пакет содержит компилятор, препроцессор, файлы заголовков, виртуальную +машину и документацию. %description -l hu %{dname} egy több platformon is működő CA-Cl*pper kompatibilis @@ -139,7 +139,7 @@ fordítóprogram. A csomag része a fordító maga, az előfordító, fejléc %package lib Summary: Shared runtime libaries for %{dname} compiler Summary(pl): Dzielone bilioteki dla kompilatora %{dname} -Summary(ru): ????????? ???????????? ?????????? ??? ??????????? %{dname} +Summary(ru): Совместно используемые библиотеки для компилятора %{dname} Summary(hu): Megosztott könyvtárak a(z) %{dname} fordítóhoz Group: Development/Languages Provides: lib%{name}.so @@ -160,9 +160,9 @@ Esse pacote %{dname} provem as bibliotecas compartilhadas para programas linkados dinamicamente. %description -l ru lib -%{dname} - ??????????, ??????????? ? ?????? CA-Cl*pper. -???? ????? ???????? ????????? ???????????? ?????????? %{dname}, -??????????? ??? ?????? ??????????? ?????????????? ????????. +%{dname} - компилятор, совместимый с языком CA-Cl*pper. +Этот пакет содержит совместно используемые библиотеки %{dname}, +необходимые для работы динамически скомпонованных программ. %description -l hu lib A(z) %{dname} egy Clipper kompatibilis fordítóprogram. @@ -177,7 +177,7 @@ programokhoz szükséges megosztott (dinamikus) futtatókönyvtárakat. Summary: Contrib runtime libaries for %{dname} compiler Summary(pl): Bilioteki z drzewa contrib dla kompilatora %{dname} Summary(pt_BR): Libs contrib para %{dname} -Summary(ru): ?????????? ?? ?????? contrib ??? ??????????? %{dname} +Summary(ru): Библиотеки из дерева contrib для компилятора %{dname} Summary(hu): Kiegészítő könyvtárak a(z) %{dname} fordítóhoz Group: Development/Languages Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} @@ -197,8 +197,8 @@ Esse pacote %{dname} provem as bibliotecas contrib para linkagem dos programas. %description -l ru contrib -%{dname} - ??????????, ??????????? ? ?????? CA-Cl*pper. -???? ????? ???????? ??????????? ?????????? %{dname} ?? ?????? contrib. +%{dname} - компилятор, совместимый с языком CA-Cl*pper. +Этот пакет содержит статические библиотеки %{dname} из дерева contrib. %description -l hu contrib A(z) %{dname} egy Clipper kompatibilis fordítóprogram. @@ -286,18 +286,18 @@ statikus szerkesztéshez. ## firebird library %{?_with_firebird:%package firebird} -%{?_with_firebird:Summary: FireBird library bindings for %{dname} compiler} -%{?_with_firebird:Summary(pl): Bilioteka FireBird dla kompilatora %{dname}} +%{?_with_firebird:Summary: Firebird library bindings for %{dname} compiler} +%{?_with_firebird:Summary(pl): Bilioteka Firebird dla kompilatora %{dname}} %{?_with_firebird:Group: Development/Languages} %{?_with_firebird:Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}} %{?_with_firebird:%description firebird} %{?_with_firebird:%{dname} is a Clipper compatible compiler.} -%{?_with_firebird:This package provides %{dname} FireBird library for program linking.} +%{?_with_firebird:This package provides %{dname} Firebird library for program linking.} %{?_with_firebird:%description -l pl firebird} %{?_with_firebird:%{dname} to kompatybilny z językiem CA-Cl*pper kompilator.} -%{?_with_firebird:Ten pakiet udostępnia statyczn+ biliotekę FireBird dla kompilatora %{dname}.} +%{?_with_firebird:Ten pakiet udostępnia statyczn+ biliotekę Firebird dla kompilatora %{dname}.} ## freeimage library #%{?_with_freeimage:%package freeimage} @@ -381,7 +381,7 @@ statikus szerkesztéshez. %prep %setup -c %{name} -rm -rf $RPM_BUILD_ROOT +rm -rf "$RPM_BUILD_ROOT" ###################################################################### ## Build. @@ -396,7 +396,7 @@ make %{?_smp_mflags} ## Install. ###################################################################### -# Install harbour itself. +# Install Harbour itself. %install %{hb_env} @@ -435,7 +435,7 @@ rm -f $HB_INSTALL_LIB/libjpeg.a \ ###################################################################### ## Clean. ###################################################################### -rm -rf $RPM_BUILD_ROOT +rm -rf "$RPM_BUILD_ROOT" ###################################################################### ## File list. @@ -726,15 +726,15 @@ rm -rf $RPM_BUILD_ROOT ###################################################################### %changelog -* Thu Aug 05 2008 Viktor Szakats (vszakats.net/harbour) +* Tue Aug 05 2008 Viktor Szakats (vszakats.net/harbour) - removed hbdot, hbverfix, hbpptest -- hbrun now fully replaces hbdot. +- hbrun now fully replaces hbdot * Thu Aug 23 2007 Przemyslaw Czerpak + added hbdot - removed PP package -* Fri Mar 23 2005 Przemyslaw Czerpak +* Wed Mar 23 2005 Przemyslaw Czerpak - removed bison and flex from dependences list * Sat Aug 09 2003 Przemyslaw Czerpak @@ -768,7 +768,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Jan 17 2002 Dave Pearson - Removed the use of the /etc/profile.d scripts for setting the - harbour environment variables. The settings are now placed + Harbour environment variables. The settings are now placed directly in gharbour and harbour-link. This means that this .spec file should be more useful on RPM using platforms other than RedHat. @@ -789,7 +789,7 @@ rm -rf $RPM_BUILD_ROOT - Added the setting of $HB_GT_LIB to the environment (ncurses is used). - Added support for installing hbmake. -* Mon Jun 28 2001 Dave Pearson +* Thu Jun 28 2001 Dave Pearson - Changed the gharbour script so that it only invokes the C compiler if a C file was output. This stops any error messages when someone is using the -g option to output other target types. @@ -801,8 +801,8 @@ rm -rf $RPM_BUILD_ROOT - Added README.RPM to the documentation directory. * Sat Jan 06 2001 Dave Pearson -- The gharbour script now passes the harbour include directory, using -I, - to harbour. +- The gharbour script now passes the Harbour include directory, using -I, + to Harbour. * Thu Aug 24 2000 Dave Pearson - Changed the files section so that hbrun doesn't get installed. It isn't @@ -823,13 +823,13 @@ rm -rf $RPM_BUILD_ROOT - Added 'bash' and 'sh-utils' to the list of required packages. * Tue Aug 01 2000 Dave Pearson -- Added harbour environment scripts to /etc/profile.d. +- Added Harbour environment scripts to /etc/profile.d. - Added generation of gharbour and harbour-link commands. * Mon Jul 31 2000 Dave Pearson - Re-worked the layout of the spec file to make it cleaner and easier to read and maintain. -- The latest harbour ChangeLog.txt is now installed into the RPM's doc +- The latest Harbour ChangeLog.txt is now installed into the RPM's doc directory. - The content of the RPM's doc directory reflects the layout and content of - the harbour source's doc directory. + the Harbour source's doc directory. diff --git a/package/mpkg_rpm.sh b/package/mpkg_rpm.sh index 09e972211e..2e3451e2c0 100755 --- a/package/mpkg_rpm.sh +++ b/package/mpkg_rpm.sh @@ -7,182 +7,173 @@ # See LICENSE.txt for licensing terms. # --------------------------------------------------------------- -test_reqrpm() -{ - rpm -q --whatprovides "$1" >/dev/null 2>&1 +test_reqrpm() { + rpm -q --whatprovides "$1" >/dev/null 2>&1 } -NEED_RPM="make gcc binutils" +NEED_RPM='make gcc binutils' -FORCE="" +FORCE='' -LAST="" -while [ $# -gt 0 ] -do - if [ "$1" = "--force" ] - then - FORCE="yes" - else - INST_PARAM="${INST_PARAM} $1" - if [ "${LAST}" = "--with" ] - then - [ "$1" = "mysql" ] && NEED_RPM="${NEED_RPM} mysql-devel" - [ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixODBC-devel" - [ "$1" = "pgsql" ] && NEED_RPM="${NEED_RPM} postgresql-devel" - [ "$1" = "firebird" ] && NEED_RPM="${NEED_RPM} firebird-devel" - [ "$1" = "freeimage" ] && NEED_RPM="${NEED_RPM} freeimage-devel" - [ "$1" = "allegro" ] && NEED_RPM="${NEED_RPM} allegro-devel" - fi - fi - LAST="$1" - shift +LAST='' +while [ $# -gt 0 ]; do + if [ "$1" = '--force' ]; then + FORCE='yes' + else + INST_PARAM="${INST_PARAM} $1" + if [ "${LAST}" = '--with' ]; then + [ "$1" = 'mysql' ] && NEED_RPM="${NEED_RPM} mysql-devel" + [ "$1" = 'odbc' ] && NEED_RPM="${NEED_RPM} unixODBC-devel" + [ "$1" = 'pgsql' ] && NEED_RPM="${NEED_RPM} postgresql-devel" + [ "$1" = 'firebird' ] && NEED_RPM="${NEED_RPM} firebird-devel" + [ "$1" = 'freeimage' ] && NEED_RPM="${NEED_RPM} freeimage-devel" + [ "$1" = 'allegro' ] && NEED_RPM="${NEED_RPM} allegro-devel" + fi + fi + LAST="$1" + shift done -if [ "$HB_WITH_ADS" != "no" ] -then - if [ -f /usr/local/ads/acesdk/ace.h ] || \ - [ -f ${HOME}/ads/acesdk/ace.h ] || \ - [ -f ${HB_WITH_ADS}/ace.h ] - then - INST_PARAM="${INST_PARAM} --with ads" - fi +if [ "$HB_WITH_ADS" != 'no' ]; then + if [ -f /usr/local/ads/acesdk/ace.h ] || \ + [ -f "${HOME}/ads/acesdk/ace.h" ] || \ + [ -f "${HB_WITH_ADS}/ace.h" ]; then + INST_PARAM="${INST_PARAM} --with ads" + fi fi -if test_reqrpm "allegro-devel" && [ "$HB_WITH_ALLEGRO" != "no" ] -then - INST_PARAM="${INST_PARAM} --with allegro" +if test_reqrpm 'allegro-devel' && \ + [ "$HB_WITH_ALLEGRO" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with allegro" fi -if test_reqrpm "cairo-devel" && [ "$HB_WITH_CAIRO" != "no" ] -then - INST_PARAM="${INST_PARAM} --with cairo" +if test_reqrpm 'cairo-devel' && \ + [ "$HB_WITH_CAIRO" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with cairo" fi -if test_reqrpm "libcups2-devel" && [ "$HB_WITH_CUPS" != "no" ] -then - INST_PARAM="${INST_PARAM} --with cups" +if test_reqrpm 'libcups2-devel' && \ + [ "$HB_WITH_CUPS" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with cups" fi -if test_reqrpm "curl-devel" && [ "$HB_WITH_CURL" != "no" ] -then - INST_PARAM="${INST_PARAM} --with curl" +if test_reqrpm 'curl-devel' && \ + [ "$HB_WITH_CURL" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with curl" fi -if test_reqrpm "openssl" && [ "$HB_WITH_OPENSSL" != "no" ] -then - INST_PARAM="${INST_PARAM} --with openssl" +if test_reqrpm 'openssl' && \ + [ "$HB_WITH_OPENSSL" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with openssl" fi -if test_reqrpm "firebird-devel" && [ "$HB_WITH_FIREBIRD" != "no" ] -then - INST_PARAM="${INST_PARAM} --with firebird" +if test_reqrpm 'firebird-devel' && \ + [ "$HB_WITH_FIREBIRD" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with firebird" fi -if test_reqrpm "freeimage-devel" && [ "$HB_WITH_FREEIMAGE" != "no" ] -then - INST_PARAM="${INST_PARAM} --with freeimage" +if test_reqrpm 'freeimage-devel' && \ + [ "$HB_WITH_FREEIMAGE" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with freeimage" fi -if test_reqrpm "gd-devel" && [ "$HB_WITH_GD" != "no" ] -then - v=`rpm -q --whatprovides gd-devel --qf "%{VERSION}"|sed -e "s/[^0-9]*\([0-9]*\).*/\1/g"` - [ "$v" -ge 2 ] && INST_PARAM="${INST_PARAM} --with gd" +if test_reqrpm 'gd-devel' && \ + [ "$HB_WITH_GD" != 'no' ]; then + v="$(rpm -q --whatprovides gd-devel --qf "%{VERSION}" | sed -e 's/[^0-9]*\([0-9]*\).*/\1/g')" + [ "$v" -ge 2 ] && INST_PARAM="${INST_PARAM} --with gd" fi -if ( test_reqrpm "MySQL-devel" || test_reqrpm "mysql-devel" ) && \ - [ "$HB_WITH_MYSQL" != "no" ] -then - INST_PARAM="${INST_PARAM} --with mysql" +if ( test_reqrpm 'MySQL-devel' || \ + test_reqrpm 'mysql-devel' ) && \ + [ "$HB_WITH_MYSQL" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with mysql" fi -if ( test_reqrpm "unixodbc-devel" || test_reqrpm "unixODBC-devel" ) && \ - [ "$HB_WITH_ODBC" != "no" ] -then - INST_PARAM="${INST_PARAM} --with odbc" +if ( test_reqrpm 'unixodbc-devel' || \ + test_reqrpm 'unixODBC-devel' ) && \ + [ "$HB_WITH_ODBC" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with odbc" fi -if test_reqrpm "postgresql-devel" && [ "$HB_WITH_PGSQL" != "no" ] -then - INST_PARAM="${INST_PARAM} --with pgsql" +if test_reqrpm 'postgresql-devel' && \ + [ "$HB_WITH_PGSQL" != 'no' ]; then + INST_PARAM="${INST_PARAM} --with pgsql" fi -if [ "${HB_BUILD_NOGPLLIB}" = "yes" ] -then - INST_PARAM="${INST_PARAM} --without gpllib" +if [ "${HB_BUILD_NOGPLLIB}" = 'yes' ]; then + INST_PARAM="${INST_PARAM} --without gpllib" fi -if [ "${HB_BUILD_NOGPLLIB}" = "yes" ] || [ "$HB_WITH_GPM" = "no" ] || \ - ! test_reqrpm "gpm-devel" -then - INST_PARAM="${INST_PARAM} --without gpm" +if [ "${HB_BUILD_NOGPLLIB}" = 'yes' ] || \ + [ "$HB_WITH_GPM" = 'no' ] || \ + ! test_reqrpm 'gpm-devel'; then + INST_PARAM="${INST_PARAM} --without gpm" fi -if ! test_reqrpm "XFree86-devel" && [ "$HB_WITH_X11" != "no" ] -then - INST_PARAM="${INST_PARAM} --without X11" +if ! test_reqrpm 'XFree86-devel' && \ + [ "$HB_WITH_X11" != 'no' ]; then + INST_PARAM="${INST_PARAM} --without X11" fi -if ! test_reqrpm ncurses || ! test_reqrpm ncurses-devel || \ - [ "$HB_WITH_CURSES" != "no" ] -then - INST_PARAM="${INST_PARAM} --without curses" +if ! test_reqrpm 'ncurses' || \ + ! test_reqrpm 'ncurses-devel' || \ + [ "$HB_WITH_CURSES" != 'no' ]; then + INST_PARAM="${INST_PARAM} --without curses" fi -if ! test_reqrpm slang || ! test_reqrpm slang-devel || \ - [ "$HB_WITH_SLANG" != "no" ] -then - INST_PARAM="${INST_PARAM} --without slang" +if ! test_reqrpm 'slang' || \ + ! test_reqrpm 'slang-devel' || \ + [ "$HB_WITH_SLANG" != 'no' ]; then + INST_PARAM="${INST_PARAM} --without slang" fi -if ( [ ! -f /usr/include/zlib.h ] && [ ! -f /usr/local/include/zlib.h ] ) || \ - [ "$HB_WITH_ZLIB" = "local" ] -then - INST_PARAM="${INST_PARAM} --with localzlib" +if ( [ ! -f /usr/include/zlib.h ] && \ + [ ! -f /usr/local/include/zlib.h ] ) || \ + [ "$HB_WITH_ZLIB" = 'local' ]; then + INST_PARAM="${INST_PARAM} --with localzlib" fi -if ( [ ! -f /usr/include/pcre.h ] && [ ! -f /usr/local/include/pcre.h ] ) || \ - [ "$HB_WITH_PCRE" = "local" ] -then - INST_PARAM="${INST_PARAM} --with localpcre" +if ( [ ! -f /usr/include/pcre.h ] && \ + [ ! -f /usr/local/include/pcre.h ] ) || \ + [ "$HB_WITH_PCRE" = 'local' ]; then + INST_PARAM="${INST_PARAM} --with localpcre" fi -if ( [ ! -f /usr/include/bzlib.h ] && [ ! -f /usr/local/include/bzlib.h ] ) || \ - [ "$HB_WITH_BZIP2" = "local" ] -then - INST_PARAM="${INST_PARAM} --with localbz2" +if ( [ ! -f /usr/include/bzlib.h ] && \ + [ ! -f /usr/local/include/bzlib.h ] ) || \ + [ "$HB_WITH_BZIP2" = 'local' ]; then + INST_PARAM="${INST_PARAM} --with localbz2" fi -TOINST_LST="" -for i in ${NEED_RPM} -do - test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" +TOINST_LST='' +for i in ${NEED_RPM}; do + test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" done -if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ] -then - cd `dirname $0` - . ./mpkg_src.sh - stat="$?" - if [ -z "${hb_filename}" ] - then - echo "The script ./mpkg_src.sh doesn't set archive name to \${hb_filename}" - exit 1 - elif [ "${stat}" != 0 ] - then - echo "Error during packing the sources in ./mpkg_src.sh" - exit 1 - elif [ -f ${hb_filename} ] - then - if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ] - then - RPMDIR="${HOME}/RPM" - mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \ - ${RPMDIR}/BUILD ${RPMDIR}/SPECS - echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros - else - RPMDIR=`rpm --eval %_topdir` - fi +if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = 'yes' ]; then + cd "$(dirname "$0")" + . ./mpkg_src.sh + stat="$?" + if [ -z "${hb_filename}" ]; then + echo "The script ./mpkg_src.sh didn't set archive name to \${hb_filename}" + exit 1 + elif [ "${stat}" != 0 ]; then + echo 'Error during packing the sources in ./mpkg_src.sh' + exit 1 + elif [ -f "${hb_filename}" ]; then + if [ "$(id -u)" != 0 ] && \ + [ ! -f "${HOME}/.rpmmacros" ]; then + RPMDIR="${HOME}/RPM" + mkdir -p \ + "${RPMDIR}/BUILD" \ + "${RPMDIR}/RPMS" \ + "${RPMDIR}/SOURCES" \ + "${RPMDIR}/SPECS" \ + "${RPMDIR}/SRPMS" + echo "%_topdir ${RPMDIR}" > "${HOME}/.rpmmacros" + else + RPMDIR=$(rpm --eval %_topdir) + fi - mv -f ${hb_filename} ${RPMDIR}/SOURCES/ - cp harbour.spec ${RPMDIR}/SPECS/ + mv -f "${hb_filename}" "${RPMDIR}/SOURCES/" + cp harbour.spec "${RPMDIR}/SPECS/" - if which rpmbuild >/dev/null 2>&1 - then - RPMBLD="rpmbuild" - else - RPMBLD="rpm" - fi - cd ${RPMDIR}/SPECS - ${RPMBLD} -ba harbour.spec ${INST_PARAM} - else - echo "Cannot find archive file: ${hb_filename}" - exit 1 - fi + if which rpmbuild >/dev/null 2>&1; then + RPMBLD='rpmbuild' + else + RPMBLD='rpm' + fi + cd ${RPMDIR}/SPECS + ${RPMBLD} -ba harbour.spec ${INST_PARAM} + else + echo "Cannot find archive file: ${hb_filename}" + exit 1 + fi else - echo "If you want to build Harbour compiler" - echo "you have to install the folowing RPM files:" - echo "${TOINST_LST}" - exit 1 + echo 'If you want to build Harbour compiler' + echo 'you have to install the folowing RPM files:' + echo "${TOINST_LST}" + exit 1 fi diff --git a/package/mpkg_rpm_wce.sh b/package/mpkg_rpm_wce.sh index ff3f5b6fad..f4b98cb23c 100755 --- a/package/mpkg_rpm_wce.sh +++ b/package/mpkg_rpm_wce.sh @@ -7,102 +7,93 @@ # See LICENSE.txt for licensing terms. # --------------------------------------------------------------- -test_reqrpm() -{ - rpm -q --whatprovides "$1" >/dev/null 2>&1 +test_reqrpm() { + rpm -q --whatprovides "$1" >/dev/null 2>&1 } -get_rpmmacro() -{ - local R X Y - - R=`rpm --showrc|sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//"` - X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` - while [ "${X}" != "${R}" ] - do - Y=`get_rpmmacro "$X"` - if [ -n "${Y}" ] - then - R=`echo "${R}"|sed -e "s!%{${X}}!${Y}!g"` - X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` - else - X="${R}" - fi - done - echo -n "${R}" +get_rpmmacro() { + _R="$(rpm --showrc | sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//")" + _X="$(echo "${_R}" | sed -e 's/.*\(%{\([^}]*\)}\).*/\2/')" + while [ "${_X}" != "${_R}" ]; do + _Y=$(get_rpmmacro "$_X") + if [ -n "${_Y}" ]; then + _R="$(echo "${_R}" | sed -e "s!%{${_X}}!${_Y}!g")" + _X="$(echo "${_R}" | sed -e 's/.*\(%{\([^}]*\)}\).*/\2/')" + else + _X="${_R}" + fi + done + printf %s "${_R}" } -cd `dirname $0` +cd "$(dirname "$0")" . ./mpkg_ver.sh -hb_ver=`get_hbver` -hb_verstat=`get_hbverstat` -[ -n "${hb_verstat}" ] || hb_verstat="0" +hb_ver=$(get_hbver) +hb_verstat=$(get_hbverstat) +[ -n "${hb_verstat}" ] || hb_verstat='0' -NEED_RPM="make gcc binutils cegcc-mingw32ce" +NEED_RPM='make gcc binutils cegcc-mingw32ce' -FORCE="" +FORCE='' LAST="" -while [ $# -gt 0 ] -do - if [ "$1" = "--force" ] - then - FORCE="yes" - else - INST_PARAM="${INST_PARAM} $1" - fi - LAST="$1" - shift +while [ $# -gt 0 ]; do + if [ "$1" = '--force' ]; then + FORCE='yes' + else + INST_PARAM="${INST_PARAM} $1" + fi + LAST="$1" + shift done -TOINST_LST="" -for i in ${NEED_RPM} -do - test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" +TOINST_LST='' +for i in ${NEED_RPM}; do + test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" done -if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ] -then - . ./mpkg_src.sh - stat="$?" - if [ -z "${hb_filename}" ] - then - echo "The script ./mpkg_src.sh doesn't set archive name to \${hb_filename}" - exit 1 - elif [ "${stat}" != 0 ] - then - echo "Error during packing the sources in ./mpkg_src.sh" - exit 1 - elif [ -f ${hb_filename} ] - then - if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ] - then - RPMDIR="${HOME}/RPM" - mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \ - ${RPMDIR}/BUILD ${RPMDIR}/SPECS - echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros - else - RPMDIR=`get_rpmmacro "_topdir"` - fi - mv ${hb_filename} ${RPMDIR}/SOURCES/ - sed -e "s/^%define version .*$/%define version ${hb_ver}/g" \ - -e "s/^%define releasen .*$/%define releasen ${hb_verstat}/g" \ - harbour-wce.spec.in > ${RPMDIR}/SPECS/harbour-wce.spec - if which rpmbuild >/dev/null 2>&1 - then - RPMBLD="rpmbuild" - else - RPMBLD="rpm" - fi - cd ${RPMDIR}/SPECS - ${RPMBLD} -ba harbour-wce.spec ${INST_PARAM} - else - echo "Cannot find archive file: ${hb_filename}" - exit 1 - fi +if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = 'yes' ]; then + . ./mpkg_src.sh + stat="$?" + if [ -z "${hb_filename}" ]; then + echo "The script ./mpkg_src.sh didn't set archive name to \${hb_filename}" + exit 1 + elif [ "${stat}" != 0 ]; then + echo 'Error during packing the sources in ./mpkg_src.sh' + exit 1 + elif [ -f "${hb_filename}" ]; then + if [ "$(id -u)" != 0 ] && \ + [ ! -f "${HOME}/.rpmmacros" ]; then + RPMDIR="${HOME}/RPM" + mkdir -p \ + "${RPMDIR}/BUILD" \ + "${RPMDIR}/RPMS" \ + "${RPMDIR}/SOURCES" \ + "${RPMDIR}/SPECS" \ + "${RPMDIR}/SRPMS" + echo "%_topdir ${RPMDIR}" > "${HOME}/.rpmmacros" + else + RPMDIR=$(get_rpmmacro '_topdir') + fi + + mv -f "${hb_filename}" "${RPMDIR}/SOURCES/" + sed -e "s|^%define version .*$|%define version ${hb_ver}|g" \ + -e "s|^%define releasen .*$|%define releasen ${hb_verstat}|g" \ + harbour-wce.spec.in > "${RPMDIR}/SPECS/harbour-wce.spec" + if which rpmbuild >/dev/null 2>&1; then + RPMBLD="rpmbuild" + else + RPMBLD="rpm" + fi + cd ${RPMDIR}/SPECS + ${RPMBLD} -ba harbour-wce.spec ${INST_PARAM} + else + echo "Cannot find archive file: ${hb_filename}" + exit 1 + fi else - echo "If you want to build Harbour compiler" - echo "you have to install the folowing RPM files:" - echo "${TOINST_LST}" - exit 1 + echo 'If you want to build Harbour compiler' + echo 'you have to install the folowing RPM files:' + echo "${TOINST_LST}" + exit 1 fi diff --git a/package/mpkg_rpm_win.sh b/package/mpkg_rpm_win.sh index 7c1086e30d..964cfd96a3 100755 --- a/package/mpkg_rpm_win.sh +++ b/package/mpkg_rpm_win.sh @@ -7,125 +7,113 @@ # See LICENSE.txt for licensing terms. # --------------------------------------------------------------- -test_reqrpm() -{ - rpm -q --whatprovides "$1" >/dev/null 2>&1 +test_reqrpm() { + rpm -q --whatprovides "$1" >/dev/null 2>&1 } -get_rpmmacro() -{ - local R X Y - - R=`rpm --showrc|sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//"` - X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` - while [ "${X}" != "${R}" ] - do - Y=`get_rpmmacro "$X"` - if [ -n "${Y}" ] - then - R=`echo "${R}"|sed -e "s!%{${X}}!${Y}!g"` - X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"` - else - X="${R}" - fi - done - echo -n "${R}" +get_rpmmacro() { + _R="$(rpm --showrc | sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//")" + _X="$(echo "${_R}" | sed -e 's/.*\(%{\([^}]*\)}\).*/\2/')" + while [ "${_X}" != "${_R}" ]; do + _Y=$(get_rpmmacro "$_X") + if [ -n "${_Y}" ]; then + _R="$(echo "${_R}" | sed -e "s!%{${_X}}!${_Y}!g")" + _X="$(echo "${_R}" | sed -e 's/.*\(%{\([^}]*\)}\).*/\2/')" + else + _X="${_R}" + fi + done + printf %s "${_R}" } -for d in /usr /usr/local /usr/local/mingw32 /opt/xmingw /opt/cross -do - if [ -z "${TARGET}" ] - then - TARGET=`find $d/bin -maxdepth 1 -name "i[3456]86*-mingw*-gcc" \ - 2>/dev/null | \ - sed -e '1 !d' -e 's/.*\(i[3456]86.*-mingw[^-]*\).*/\1/g'` - MINGW_DIR=$d - fi +for d in /usr /usr/local /usr/local/mingw32 /opt/xmingw /opt/cross; do + if [ -z "${TARGET}" ]; then + TARGET=$(find $d/bin -maxdepth 1 -name 'i[3456]86*-mingw*-gcc' \ + 2>/dev/null \ + | sed -e '1 !d' -e 's/.*\(i[3456]86.*-mingw[^-]*\).*/\1/g') + MINGW_DIR=$d + fi done -if [ -z "${TARGET}" ] -then - echo "Can't determine the location for the MinGW32 cross-compiler." - echo "Please install it or add valid path to the $0 script." - exit 1 +if [ -z "${TARGET}" ]; then + echo "Could not determine the location for the MinGW32 cross-compiler." + echo "Please install it or add valid path to the $0 script." + exit 1 fi HB_CCPREFIX="$TARGET-" HB_CCPATH="$MINGW_DIR/bin" -cd `dirname $0` +cd "$(dirname "$0")" . ./mpkg_ver.sh -hb_ver=`get_hbver` -hb_verstat=`get_hbverstat` -[ -n "${hb_verstat}" ] || hb_verstat="0" +hb_ver=$(get_hbver) +hb_verstat=$(get_hbverstat) +[ -n "${hb_verstat}" ] || hb_verstat='0' -NEED_RPM="make gcc binutils" +NEED_RPM='make gcc binutils' -FORCE="" +FORCE='' LAST="" -while [ $# -gt 0 ] -do - if [ "$1" = "--force" ] - then - FORCE="yes" - else - INST_PARAM="${INST_PARAM} $1" - fi - LAST="$1" - shift +while [ $# -gt 0 ]; do + if [ "$1" = '--force' ]; then + FORCE='yes' + else + INST_PARAM="${INST_PARAM} $1" + fi + LAST="$1" + shift done -TOINST_LST="" -for i in ${NEED_RPM} -do - test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" +TOINST_LST='' +for i in ${NEED_RPM}; do + test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i" done -if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ] -then - . ./mpkg_src.sh - stat="$?" - if [ -z "${hb_filename}" ] - then - echo "The script ./mpkg_src.sh doesn't set archive name to \${hb_filename}" - exit 1 - elif [ "${stat}" != 0 ] - then - echo "Error during packing the sources in ./mpkg_src.sh" - exit 1 - elif [ -f ${hb_filename} ] - then - if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ] - then - RPMDIR="${HOME}/RPM" - mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \ - ${RPMDIR}/BUILD ${RPMDIR}/SPECS - echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros - else - RPMDIR=`get_rpmmacro "_topdir"` - fi - mv ${hb_filename} ${RPMDIR}/SOURCES/ - sed -e "s|^%define version .*$|%define version ${hb_ver}|g" \ - -e "s|^%define releasen .*$|%define releasen ${hb_verstat}|g" \ - -e "s|^%define hb_ccpath .*$|%define hb_ccpath ${HB_CCPATH}|g" \ - -e "s|^%define hb_ccpref .*$|%define hb_ccpref ${HB_CCPREFIX}|g" \ - harbour-win.spec.in > ${RPMDIR}/SPECS/harbour-win.spec - if which rpmbuild >/dev/null 2>&1 - then - RPMBLD="rpmbuild" - else - RPMBLD="rpm" - fi - cd ${RPMDIR}/SPECS - ${RPMBLD} -ba harbour-win.spec ${INST_PARAM} - else - echo "Cannot find archive file: ${hb_filename}" - exit 1 - fi +if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = 'yes' ]; then + . ./mpkg_src.sh + stat="$?" + if [ -z "${hb_filename}" ]; then + echo "The script ./mpkg_src.sh didn't set archive name to \${hb_filename}" + exit 1 + elif [ "${stat}" != 0 ]; then + echo 'Error during packing the sources in ./mpkg_src.sh' + exit 1 + elif [ -f "${hb_filename}" ]; then + if [ "$(id -u)" != 0 ] && \ + [ ! -f "${HOME}/.rpmmacros" ]; then + RPMDIR="${HOME}/RPM" + mkdir -p \ + "${RPMDIR}/BUILD" \ + "${RPMDIR}/RPMS" \ + "${RPMDIR}/SOURCES" \ + "${RPMDIR}/SPECS" \ + "${RPMDIR}/SRPMS" + echo "%_topdir ${RPMDIR}" > "${HOME}/.rpmmacros" + else + RPMDIR=$(get_rpmmacro '_topdir') + fi + + mv -f "${hb_filename}" "${RPMDIR}/SOURCES/" + sed -e "s|^%define version .*$|%define version ${hb_ver}|g" \ + -e "s|^%define releasen .*$|%define releasen ${hb_verstat}|g" \ + -e "s|^%define hb_ccpath .*$|%define hb_ccpath ${HB_CCPATH}|g" \ + -e "s|^%define hb_ccpref .*$|%define hb_ccpref ${HB_CCPREFIX}|g" \ + harbour-win.spec.in > "${RPMDIR}/SPECS/harbour-win.spec" + if which rpmbuild >/dev/null 2>&1; then + RPMBLD="rpmbuild" + else + RPMBLD="rpm" + fi + cd ${RPMDIR}/SPECS + ${RPMBLD} -ba harbour-win.spec ${INST_PARAM} + else + echo "Cannot find archive file: ${hb_filename}" + exit 1 + fi else - echo "If you want to build Harbour compiler" - echo "you have to install the folowing RPM files:" - echo "${TOINST_LST}" - exit 1 + echo 'If you want to build Harbour compiler' + echo 'you have to install the folowing RPM files:' + echo "${TOINST_LST}" + exit 1 fi diff --git a/package/mpkg_src.sh b/package/mpkg_src.sh index e7ecb2635c..483d17412c 100755 --- a/package/mpkg_src.sh +++ b/package/mpkg_src.sh @@ -2,77 +2,72 @@ # This script requires 'GNU tar' tool for compression. -if [ "$1" = "zip" ] || [ "$1" = "ZIP" ]; then - hb_archbin="zip" - hb_ext=".zip" +if [ "$1" = 'zip' ] || [ "$1" = 'ZIP' ]; then + hb_archbin='zip' + hb_ext='.zip' elif tar --version >/dev/null 2>&1; then - hb_archbin="tar" - hb_gnutar="yes" + hb_archbin='tar' + hb_gnutar='yes' elif gtar --version >/dev/null 2>&1; then - hb_archbin="gtar" - hb_gnutar="yes" + hb_archbin='gtar' + hb_gnutar='yes' else - hb_archbin="tar" - hb_gnutar="no" - echo "Warning!!! Cannot find GNU TAR" + hb_archbin='tar' + hb_gnutar='no' + echo "Warning!!! Cannot find 'GNU tar'" fi -hb_currdir=`pwd` +hb_currdir="$(pwd)" -hb_archopt="-czf" -[ -n "${hb_ext}" ] || hb_ext=".tar.gz" +hb_archopt='-czf' +[ -n "${hb_ext}" ] || hb_ext='.tar.gz' if [ -f mpkg_ver.sh ]; then - hb_rootdir=".." + hb_rootdir='..' else - hb_rootdir=`dirname $0` - hb_rootdir=`dirname ${hb_rootdir}` + hb_rootdir=$(dirname "$0") + hb_rootdir=$(dirname "${hb_rootdir}") fi -. ${hb_rootdir}/package/mpkg_ver.sh +. "${hb_rootdir}/package/mpkg_ver.sh" -hb_ver=`get_hbver ${hb_rootdir}` +hb_ver=$(get_hbver "${hb_rootdir}") hb_filename="${hb_currdir}/harbour-${hb_ver}.src${hb_ext}" rm -f $hb_filename #[ -z "$TZ" ] && export TZ=PST8PDT -hb_collect_all_git() -{ - for f in `git ls-tree HEAD -r --name-only` - do - [ -f "$f" ] && echo "$f" - done +hb_collect_all_git() { + for f in $(git ls-tree HEAD -r --name-only); do + [ -f "$f" ] && echo "$f" + done } -hb_collect_all_tree() -{ - exclude="/obj/|/lib/|/bin/.*/|\.tar|\.zip|\.exe|\.log|/linux/|/win|/config/" - for f in `find -type f | grep -vE ${exclude}` - do - echo ${f:2} - done - for f in `find config -type f` - do - echo ${f} - done +hb_collect_all_tree() { + exclude='/obj/|/lib/|/bin/.*/|\.tar|\.zip|\.exe|\.log|/linux/|/win|/config/' + for f in `find -type f | grep -vE ${exclude}`; do + echo ${f:2} + done + for f in `find config -type f`; do + echo ${f} + done } -hb_rmflst="yes" -hb_flst="bin/hb_flst.tmp" -if [ -d "$hb_rootdir/.git" ] ; then - hb_rmflst="yes" - (cd "$hb_rootdir";hb_collect_all_git) > "$hb_rootdir/$hb_flst" - echo "$hb_flst" >> "$hb_rootdir/$hb_flst" +hb_rmflst='yes' +hb_flst='bin/hb_flst.tmp' +if [ -d "$hb_rootdir/.git" ]; then + hb_rmflst='yes' + (cd "$hb_rootdir";hb_collect_all_git) > "$hb_rootdir/$hb_flst" + echo "$hb_flst" >> "$hb_rootdir/$hb_flst" else - hb_rmflst="yes" - (cd "$hb_rootdir";hb_collect_all_tree) > "$hb_rootdir/$hb_flst" + hb_rmflst='yes' + (cd "$hb_rootdir";hb_collect_all_tree) > "$hb_rootdir/$hb_flst" fi -if [ "$hb_archbin" = "zip" ]; then - (cd "$hb_rootdir";$hb_archbin -r -q $hb_filename . "-i@$hb_flst") +if [ "$hb_archbin" = 'zip' ]; then + (cd "$hb_rootdir";$hb_archbin -r -q $hb_filename . "-i@$hb_flst") else - (cd "$hb_rootdir";$hb_archbin $hb_archopt $hb_filename --files-from "$hb_flst") + (cd "$hb_rootdir";$hb_archbin $hb_archopt $hb_filename --files-from "$hb_flst") fi -[ "$hb_rmflst" != "yes" ] || rm -fR "$hb_rootdir/$hb_flst" +[ "$hb_rmflst" != 'yes' ] || rm -fR "$hb_rootdir/$hb_flst" cd "$hb_currdir" diff --git a/package/mpkg_ver.sh b/package/mpkg_ver.sh index d48c560da6..c2a3a7f90e 100755 --- a/package/mpkg_ver.sh +++ b/package/mpkg_ver.sh @@ -7,20 +7,22 @@ # See LICENSE.txt for licensing terms. # --------------------------------------------------------------- -get_hbver() -{ - if [ -z "$hb_rootdir" ]; then hb_rootdir=".."; fi - FVER="${hb_rootdir}/include/hbver.h" - MAJOR=`sed -e '/HB_VER_MAJOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"` - MINOR=`sed -e '/HB_VER_MINOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"` - RELEA=`sed -e '/HB_VER_RELEASE/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"` - echo "${MAJOR}.${MINOR}.${RELEA}" +get_hbver() { + if [ -z "$hb_rootdir" ]; then + hb_rootdir='..' + fi + FVER="${hb_rootdir}/include/hbver.h" + MAJOR="$(sed -e '/HB_VER_MAJOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}")" + MINOR="$(sed -e '/HB_VER_MINOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}")" + RELEA="$(sed -e '/HB_VER_RELEASE/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}")" + echo "${MAJOR}.${MINOR}.${RELEA}" } -get_hbverstat() -{ - if [ -z "$hb_rootdir" ]; then hb_rootdir=".."; fi - FVER="${hb_rootdir}/include/hbver.h" - VERSTAT=`sed -e '/HB_VER_STATUS/ !d' -e 's/[^\"]*\"\([^\"]*\).*/\1/g' "${FVER}"` - echo "${VERSTAT}" +get_hbverstat() { + if [ -z "$hb_rootdir" ]; then + hb_rootdir='..' + fi + FVER="${hb_rootdir}/include/hbver.h" + VERSTAT="$(sed -e '/HB_VER_STATUS/ !d' -e 's/[^\"]*\"\([^\"]*\).*/\1/g' "${FVER}")" + echo "${VERSTAT}" } diff --git a/package/mpkg_win.nsi b/package/mpkg_win.nsi index c1535c2728..5742a635ef 100644 --- a/package/mpkg_win.nsi +++ b/package/mpkg_win.nsi @@ -16,7 +16,7 @@ !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_FINISHPAGE_SHOWREADME 'notepad.exe "$\"$INSTDIR\README.md$\""' - !define MUI_ICON "harb_win.ico" + !define MUI_ICON "harbour.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico" SetDateSave on diff --git a/package/winuni/mpkg_win_uni.nsi b/package/winuni/mpkg_win_uni.nsi index 67b6c7cdb2..37a982401b 100644 --- a/package/winuni/mpkg_win_uni.nsi +++ b/package/winuni/mpkg_win_uni.nsi @@ -15,7 +15,7 @@ SetCompressor /solid lzma !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp" !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_FINISHPAGE_SHOWREADME 'notepad.exe "$\"$INSTDIR\README.md$\""' - !define MUI_ICON "..\harb_win.ico" + !define MUI_ICON "..\harbour.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico" SetDateSave on diff --git a/utils/hbmk2/Makefile b/utils/hbmk2/Makefile index 7425015cc7..63a979ee86 100644 --- a/utils/hbmk2/Makefile +++ b/utils/hbmk2/Makefile @@ -5,8 +5,7 @@ include $(TOP)$(ROOT)config/global.mk PRG_SOURCES := \ hbmk2.prg \ -RC_SOURCES := \ - hbmk2.rc +RC_SOURCES := harbour.rc PRG_MAIN := hbmk2.prg @@ -31,6 +30,6 @@ endif # is better than Main() HB_PRGFLAGS += -DHBMK_USE_APPMAIN -HB_PRGFLAGS += -DHBMK_WITH_ALL_EMBEDDED_HEADERS +HB_PRGFLAGS += -DHBMK_WITH_BUILTIN_HEADERS_ALL include $(TOP)$(ROOT)config/bin.mk diff --git a/utils/hbmk2/hbmk2.rc b/utils/hbmk2/harbour.rc similarity index 67% rename from utils/hbmk2/hbmk2.rc rename to utils/hbmk2/harbour.rc index 50f9c673cd..eddd849dfb 100644 --- a/utils/hbmk2/hbmk2.rc +++ b/utils/hbmk2/harbour.rc @@ -1,10 +1,9 @@ - #if defined( OS2 ) || defined( __OS2__ ) || defined( OS_2 ) ICON 1 DISCARDABLE "../../package/harb_os2.ico" #else #if ! defined( __BORLANDC__ ) -1 ICON DISCARDABLE "../../package/harb_win.ico" +1 ICON DISCARDABLE "../../package/harbour.ico" #endif -#include "../../package/harb_win.rc" -__HB_CREATEPROCESS_MANIFEST_RESOURCE_ID __HB_RT_MANIFEST "../../package/harb_win.mft" +#include "../../package/harbour.rc" +__HB_CREATEPROCESS_MANIFEST_RESOURCE_ID __HB_RT_MANIFEST "../../package/harbour.mft" #endif diff --git a/utils/hbmk2/hbmk2.hbp b/utils/hbmk2/hbmk2.hbp index c5db911974..021bc28df6 100644 --- a/utils/hbmk2/hbmk2.hbp +++ b/utils/hbmk2/hbmk2.hbp @@ -17,15 +17,15 @@ hbmk2.prg -main=__hbmk_public_entry -DHBMK_USE_CUSTMAIN --DHBMK_WITH_ALL_EMBEDDED_HEADERS +-DHBMK_WITH_BUILTIN_HEADERS_ALL -lhbdossrl{dos} # not using these together with .rc input, because some compilers (mingw) # do not support multiple .rc inputs -#-icon={allwin}../../package/harb_win.ico +#-icon={allwin}../../package/harbour.ico #-icon={os2}../../package/harb_os2.ico -hbmk2.rc +harbour.rc # localization po/hbmk2.%{hb_lng}.po diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index 4ab433b002..99b1abf806 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -13654,8 +13654,8 @@ STATIC FUNCTION __hb_extern_gen( hbmk, aFuncList, cOutputName ) STATIC FUNCTION hbmk_CoreHeaderFiles() THREAD STATIC t_hHeaders := NIL -#if defined( HBMK_WITH_EMBEDDED_HEADERS ) .OR. ; - defined( HBMK_WITH_ALL_EMBEDDED_HEADERS ) +#if defined( HBMK_WITH_BUILTIN_HEADERS_TOP ) .OR. ; + defined( HBMK_WITH_BUILTIN_HEADERS_ALL ) IF t_hHeaders == NIL t_hHeaders := { => } @@ -13667,7 +13667,7 @@ STATIC FUNCTION hbmk_CoreHeaderFiles() #if defined( _HBSHELL_EXTRA_HEADER ) ADD HEADER TO t_hHeaders FILE _HBSHELL_EXTRA_HEADER #endif -#if defined( HBMK_WITH_ALL_EMBEDDED_HEADERS ) +#if defined( HBMK_WITH_BUILTIN_HEADERS_ALL ) ADD HEADER TO t_hHeaders FILE "achoice.ch" ADD HEADER TO t_hHeaders FILE "assert.ch" ADD HEADER TO t_hHeaders FILE "blob.ch" @@ -16548,9 +16548,9 @@ STATIC PROCEDURE ShowHelp( hbmk, lMore, lLong ) AAdd( aLst_File_Shell, { _EXT_FILE_ , hb_StrFormat( I_( "list of extensions to load in interactive Harbour shell. One extension per line, part of line beyond a '#' character is ignored. Alternate filename on %2$s: %1$s. Resides in [*]: %3$s" ), _EXT_FILE_ALT, _EXT_FILE_ALT_OS, __hbshell_ConfigDir( hbmk[ _HBMK_lMarkdown ] ) ) } ) #endif -#if defined( HBMK_WITH_ALL_EMBEDDED_HEADERS ) +#if defined( HBMK_WITH_BUILTIN_HEADERS_ALL ) AAdd( aLst_Config, I_( "Embed all core Harbour headers." ) ) -#elif defined( HBMK_WITH_EMBEDDED_HEADERS ) +#elif defined( HBMK_WITH_BUILTIN_HEADERS_TOP ) AAdd( aLst_Config, I_( "Embed frequently used core Harbour headers." ) ) #endif #ifndef _HBMK_EMBEDDED_