Files
harbour-core/harbour/make_rpm.sh
Przemyslaw Czerpak b5d010fbeb 2007-10-01 19:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/rtl/errorapi.c
    + added protection against possible GPF when some assign methods
      were called without parameters

  * harbour/source/rdd/workarea.c
    * initialize uiFalgs also when DBS_FLAGS is not set

  * harbour/contrib/bmdbfcdx/bmdbfcdx1.c
    * fixed hb_cdxSkipFilter() declaration - it should be 'static' function

  * harbour/source/pp/ppcore.c
  * harbour/source/compiler/ppcomp.c
    + added support for changing all -k? switches by #pragma, f.e.;
         #pragma -ks+
         #pragma -kM-
         #pragma -kx1
         #pragma -kJ0

  * harbour/source/compiler/hbusage.c
    * changed -ks description

  * harbour/include/hbexpra.c
  * harbour/include/hbexprb.c
    * do not generate error message for negative indexes and
      [] operators are used for simple types when -ks option
      is used

  * harbour/include/hbvmpub.h
  * harbour/include/hbapi.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/extend.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/memvars.c
    + added HB_IT_DEFAULT flags - it allows to check if item was changed

  * harbour/source/vm/memvars.c
  * harbour/include/hbvm.h
    ! fixed HB_IT_MEMOFLAG updating to be Clipper compatible. Here we are
      not Clipper compatible in one place: in clodeblock local parameters
      with memo values are marked as MEMO but if you leave function where
      codeblock were created then Clipper during detaching removes MEMO
      flag. In Harbour memo flag is kept.

  * harbour/include/hbvm.h
  * harbour/source/vm/classes.c
  * harbour/source/vm/hvm.c
    % improved speed of extended references used for SETGET methods
      and overloaded [] operators

  * harbour/include/hbapi.h
  * harbour/include/hbsetup.ch
  * harbour/source/compiler/hbcomp.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/macro.c
  * harbour/source/vm/cmdarg.c
    * removed HB_COMPAT_XHB flags - only one HB_COMPAT_XHB still exist
      in HVM in hashes.c - it will be removed soon.

  * harbour/source/common/hbverdsp.c
    * removed information about xHarbour compatibility mode - it's not
      longer used. We are emulating xHarbour behavior using external
      XHB library and standard compiler/HVM features

  * harbour/contrib/xhb/xhb.ch
  * harbour/contrib/xhb/xhbfunc.c
  * harbour/source/vm/arrayshb.c
    * moved XHB_AINS(), XHB_ADEL() from XHB lib to HVM as HB_AINS(), HB_ADEL()

  * harbour/contrib/xhb/xhb.ch
    + added #pragma -ks+
    + added transaltion for hb_enumindex( <enumvar> )

  + harbour/contrib/xhb/xhbenum.c
    + added emulation for HB_EUMMINDEX()

  * harbour/contrib/xhb/xhbfunc.c
    * do not add INET*() function wrappers for DOS builds or when
      HB_NO_DEFAULT_INET macro is set

  * harbour/contrib/xhb/xhbmsgs.c
    * added comment

  * harbour/contrib/Makefile
    + added TIP and XHB

  * harbour/make_rpm.sh
  * harbour/harbour.spec
    * removed HB_COMPAT_XHB, --with tip, --with xhb
      they are not longer necessary
2007-10-01 17:43:52 +00:00

180 lines
4.8 KiB
Bash
Executable File

#!/bin/sh
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@polbox.com>
# simple script to build RPMs from Harbour sources
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
######################################################################
# Conditional build:
# --with static - link all binaries with static libs
# --with mysql - build mysql lib
# --with pgsql - build pgsql lib
# --with gd - build gd lib
# --with odbc - build odbc lib
# --with allegro - build GTALLEG - Allegro based GT driver
# --without adsrdd - do not build ADS RDD
# --without gpl - do not build libs which needs GPL 3-rd party code
# --without nf - do not build nanforum lib
# --without x11 - do not build GTXWC
# --without gpm - build GTSLN and GTCRS without GPM support
# --without gtsln - do not build GTSLN
######################################################################
test_reqrpm()
{
rpm -q --whatprovides "$1" &> /dev/null
}
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}"
}
NEED_RPM="make gcc binutils bash ncurses ncurses-devel"
FORCE=""
BUGGY_RPM=""
if [ -f /etc/conectiva-release ]
then
BUGGY_RPM="yes"
fi
LAST=""
while [ $# -gt 0 ]
do
if [ "$1" = "--force" ]
then
FORCE="yes"
else
INST_PARAM="${INST_PARAM} $1"
if [ "${LAST}" = "--with" ]
then
if [ -f /etc/conectiva-release ]
then
[ "$1" = "mysql" ] && NEED_RPM="${NEED_RPM} MySQL-devel"
[ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixodbc-devel"
else
[ "$1" = "mysql" ] && NEED_RPM="${NEED_RPM} mysql-devel"
[ "$1" = "odbc" ] && NEED_RPM="${NEED_RPM} unixODBC-devel"
fi
[ "$1" = "pgsql" ] && NEED_RPM="${NEED_RPM} postgresql-devel"
[ "$1" = "allegro" ] && NEED_RPM="${NEED_RPM} allegro-devel"
fi
fi
LAST="$1"
shift
done
if test_reqrpm "MySQL-devel" || test_reqrpm "mysql-devel"
then
INST_PARAM="${INST_PARAM} --with mysql"
fi
if test_reqrpm "postgresql-devel"
then
INST_PARAM="${INST_PARAM} --with pgsql"
fi
if test_reqrpm "gd-devel"
then
v=`rpm -q gd|sed -e "s/[^0-9]*\([0-9]*\).*/\1/g"`
[ "$v" -ge 2 ] && INST_PARAM="${INST_PARAM} --with gd"
fi
if test_reqrpm "unixodbc-devel" || test_reqrpm "unixODBC-devel"
then
INST_PARAM="${INST_PARAM} --with odbc"
fi
if test_reqrpm "allegro-devel"
then
INST_PARAM="${INST_PARAM} --with allegro"
fi
if [ "${HB_COMMERCE}" = "yes" ]
then
INST_PARAM="${INST_PARAM} --without gpl"
fi
if [ "${HB_COMMERCE}" = "yes" ] || ! test_reqrpm "gpm-devel"
then
INST_PARAM="${INST_PARAM} --without gpm"
fi
if ! test_reqrpm "XFree86-devel"
then
INST_PARAM="${INST_PARAM} --without X11"
fi
TOINST_LST=""
for i in ${NEED_RPM}
do
test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i"
done
if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ]
then
. ./bin/pack_src.sh
stat="$?"
if [ -z "${hb_filename}" ]
then
echo "The script ./bin/pack_src.sh doesn't set archive name to \${hb_filename}"
exit 1
elif [ "${stat}" != 0 ]
then
echo "Error during packing the sources in ./bin/pack_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
if [ "${BUGGY_RPM}" = "yes" ]
then
cp ${hb_filename} ${RPMDIR}/SOURCES
cp harbour.spec ${RPMDIR}/SPECS
fi
if which rpmbuild &>/dev/null
then
RPMBLD="rpmbuild"
else
RPMBLD="rpm"
fi
if [ "${BUGGY_RPM}" = "yes" ]
then
${RPMBLD} -ba harbour.spec ${INST_PARAM}
else
${RPMBLD} -ta ${hb_filename} --rmsource ${INST_PARAM}
fi
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
fi