summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/xharbour/files')
-rw-r--r--dev-lang/xharbour/files/xharbour-as-needed.patch138
-rw-r--r--dev-lang/xharbour/files/xharbour-fPIC.patch27
-rw-r--r--dev-lang/xharbour/files/xharbour-mkinstdir.patch12
-rw-r--r--dev-lang/xharbour/files/xharbour-parallel-make.patch161
-rw-r--r--dev-lang/xharbour/files/xharbour-skip-static-utils.patch11
5 files changed, 349 insertions, 0 deletions
diff --git a/dev-lang/xharbour/files/xharbour-as-needed.patch b/dev-lang/xharbour/files/xharbour-as-needed.patch
new file mode 100644
index 000000000..ca48df389
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-as-needed.patch
@@ -0,0 +1,138 @@
+--- xharbour-1.0.0-beta1/bin/hb-func.sh.orig 2007-02-13 22:02:23.000000000 +0300
++++ xharbour-1.0.0-beta1/bin/hb-func.sh 2009-03-05 11:33:06.000000000 +0300
+@@ -324,13 +324,9 @@
+ fi
+ [ -n "\${HB_GPM_LIB}" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -l\${HB_GPM_LIB}"
+
+-if [ "\${HB_STATIC}" = "full" ]; then
+- SYSTEM_LIBS="\${SYSTEM_LIBS} -ldl"
+- if [ "\${HB_ARCHITECTURE}" = "linux" ]; then
+- SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread"
+- fi
+- LN_OPT="\${LN_OPT} -static"
+- HB_STATIC="yes"
++
++if [ "\${HB_STATIC}" = "no" ]; then
++ SYSTEM_LIBS=""
+ fi
+
+ if [ "\${HB_XBGTK}" = "yes" ]; then
+@@ -339,6 +335,14 @@
+ SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0 --libs libgnomeprint-2.2\`"
+ fi
+
++if [ "\${HB_STATIC}" = "full" ]; then
++ if [ "\${HB_ARCHITECTURE}" = "linux" ]; then
++ SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread -ldl"
++ fi
++ LN_OPT="\${LN_OPT} -static"
++ HB_STATIC="yes"
++fi
++
+ HB_LNK_REQ=""
+ for gt in \${HB_GT_REQ}; do
+ if [ "\${HB_STATIC}" = "yes" ] || [ "\${gt}" = "ALLEG" ]; then
+@@ -534,7 +538,7 @@
+
+ mk_hblibso()
+ {
+- local LIBS LIBSMT l lm ll hb_rootdir hb_ver hb_libs full_lib_name full_lib_name_mt linker_options
++ local LIBS LIBSMT l lm ll hb_rootdir hb_ver hb_libs full_lib_name full_lib_name_mt linker_options linker_mtoptions gpm
+
+ name=`get_solibname`
+ hb_rootdir="${1-.}"
+@@ -546,6 +550,32 @@
+ (cd $HB_LIB_INSTALL
+ LIBS=""
+ LIBSMT=""
++ gpm="${HB_GPM_MOUSE}"
++ linker_options="-lm"
++ linker_mtoptions=""
++ if [ "${HB_COMPILER}" = "mingw32" ]; then
++ linker_options="${linker_options} -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32 -loleaut32 -luuid -lwsock32 -lws2_32"
++ elif [ "${HB_COMPILER}" = "mingwce" ]; then
++ linker_options="${linker_options} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32"
++ elif [ "${HB_COMPILER}" = "djgpp" ]; then
++ linker_options="${linker_options}"
++ elif [ "${HB_ARCHITECTURE}" = "linux" ]; then
++ linker_options="${linker_options} -ldl -lrt"
++ linker_mtoptions="${linker_mtoptions} -lpthread"
++ elif [ "${HB_ARCHITECTURE}" = "sunos" ]; then
++ linker_options="${linker_options} -lrt -lsocket -lnsl -lresolv"
++ linker_mtoptions="${linker_mtoptions} -lpthread"
++ elif [ "${HB_ARCHITECTURE}" = "hpux" ]; then
++ linker_options="${linker_options} -lrt"
++ linker_mtoptions="${linker_mtoptions} -lpthread"
++ elif [ "${HB_ARCHITECTURE}" = "bsd" ]; then
++ linker_options="$-L/usr/local/lib {linker_options}"
++ linker_mtoptions="${linker_mtoptions} -lpthread"
++ elif [ "${HB_ARCHITECTURE}" = "darwin" ]; then
++ linker_options="-L/sw/lib -L/opt/local/lib ${linker_options}"
++ linker_mtoptions="${linker_mtoptions} -lpthread"
++ fi
++
+ for l in ${hb_libs}
+ do
+ case $l in
+@@ -562,21 +592,34 @@
+ [ "${l#gt}" = "${l}" ] || \
+ [ "${l}" = "${HB_GT_LIB}" ]
+ then
+- if [ -f $ls ]
+- then
+- LIBS="$LIBS $ls"
+- fi
+ if [ -f $lm ]
+ then
+ LIBSMT="$LIBSMT $lm"
+ fi
+- if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
++ if [ -f $ls ]
++ then
++ LIBS="$LIBS $ls"
+ if [ "${l}" = gtcrs ]; then
+- linker_options="$linker_options -lncurses"
++ if [ "${HB_ARCHITECTURE}" = "sunos" ]; then
++ linker_options="$linker_options -lcurses"
++ else
++ linker_options="$linker_options -lncurses"
++ fi
+ elif [ "${l}" = gtsln ]; then
+ if [ "${HB_WITHOUT_GTSLN}" != "yes" ]; then
+ linker_options="$linker_options -lslang"
+ fi
++ elif [ "${l}" = gtxwc ]; then
++ [ -d "/usr/X11R6/lib" ] && \
++ linker_options="$linker_options -L/usr/X11R6/lib"
++ [ -d "/usr/X11R6/lib64" ] && \
++ linker_options="$linker_options -L/usr/X11R6/lib64"
++ linker_options="$linker_options -lX11"
++ fi
++ if [ "${gpm}" = yes ] && ( [ "${l}" = gtcrs ] || \
++ [ "${l}" = gtsln ] || [ "${l}" = gttrm ] ); then
++ linker_options="$linker_options -lgpm"
++ gpm=""
+ fi
+ fi
+ fi
+@@ -586,7 +629,6 @@
+ if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
+ full_lib_name="lib${name}.${hb_ver}.dylib"
+ full_lib_name_mt="lib${name}mt.${hb_ver}.dylib"
+- linker_options="-L/sw/lib -L/opt/local/lib $linker_options"
+ elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
+ full_lib_name="${name}.dll"
+ full_lib_name_mt="${name}mt.dll"
+@@ -595,10 +637,10 @@
+ full_lib_name_mt="lib${name}mt-${hb_ver}.so"
+ fi
+ echo "Making ${full_lib_name}..."
+- $HB_BIN_INSTALL/hb-mkslib ${full_lib_name} $LIBS ${linker_options}
++ $HB_BIN_INSTALL/hb-mkslib ${full_lib_name} ${LIBS} ${linker_options}
+ if [ "$HB_MT" = "MT" ]; then
+ echo "Making ${full_lib_name_mt}..."
+- $HB_BIN_INSTALL/hb-mkslib ${full_lib_name_mt} $LIBSMT ${linker_options}
++ $HB_BIN_INSTALL/hb-mkslib ${full_lib_name_mt} ${LIBSMT} ${linker_mtoptions} ${linker_options}
+ fi
+ for l in ${full_lib_name} ${full_lib_name_mt}
+ do
diff --git a/dev-lang/xharbour/files/xharbour-fPIC.patch b/dev-lang/xharbour/files/xharbour-fPIC.patch
new file mode 100644
index 000000000..ba4faa7a5
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-fPIC.patch
@@ -0,0 +1,27 @@
+--- xharbour-1.0.0-beta1/config/linux/gcc.cf.orig 2006-07-16 23:48:56.000000000 +0400
++++ xharbour-1.0.0-beta1/config/linux/gcc.cf 2009-03-05 10:38:53.000000000 +0300
+@@ -22,9 +22,6 @@
+ # We are under linux
+ #CFLAGS = -DHB_OS_LINUX -Wall -std=gnu99
+ CFLAGS = -DHB_OS_LINUX -Wall -W -fsigned-char
+-# uncomment this if you want to force relocateable code for .so libs
+-# it's necessary on some platforms but can reduce performance
+-#CFLAGS += -fPIC
+
+ ifeq ($(HB_LEX),SIMPLEX)
+ CFLAGS += -DSIMPLEX
+@@ -36,6 +33,14 @@
+ CFLAGS+= -DHB_THREAD_SUPPORT -D_THREAD_SAFE
+ endif
+ else
++# force relocateable code for .so libs
++# it's necessary on some platforms but can reduce performance
++ifeq ($(shell sh -c 'uname -m 2>/dev/null'),x86_64)
++USE_FPIC = yes
++endif
++ifeq ($(USE_FPIC),yes)
++CFLAGS += -fPIC
++endif
+ #Add thread support to lib compilation only if compiling a _mt lib
+ ifeq ($(HB_LIBCOMP_MT),YES)
+ CFLAGS+= -DHB_THREAD_SUPPORT -D_THREAD_SAFE
diff --git a/dev-lang/xharbour/files/xharbour-mkinstdir.patch b/dev-lang/xharbour/files/xharbour-mkinstdir.patch
new file mode 100644
index 000000000..ca9c50a85
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-mkinstdir.patch
@@ -0,0 +1,12 @@
+--- xharbour-1.0.0-beta1/config/linux/install.cf.orig 2003-12-13 20:55:11.000000000 +0300
++++ xharbour-1.0.0-beta1/config/linux/install.cf 2009-03-04 17:48:05.000000000 +0300
+@@ -3,7 +3,8 @@
+ #
+
+ INSTALL_RULE =\
+- @if [ ! -d $(INSTALL_DIR) ]; \
++ @$(MDP) $(INSTALL_DIR); \
++ if [ ! -d $(INSTALL_DIR) ]; \
+ then \
+ echo "! Can't install, path not found:" $(INSTALL_DIR); \
+ else \
diff --git a/dev-lang/xharbour/files/xharbour-parallel-make.patch b/dev-lang/xharbour/files/xharbour-parallel-make.patch
new file mode 100644
index 000000000..e1c50a07e
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-parallel-make.patch
@@ -0,0 +1,161 @@
+--- xharbour-1.0.0-beta1/config/bin.cf.orig 2001-12-21 13:47:57.000000000 +0300
++++ xharbour-1.0.0-beta1/config/bin.cf 2009-03-04 18:42:51.000000000 +0300
+@@ -35,8 +35,8 @@
+
+ first:: dirbase descend
+
+-descend :
+- @$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME)
++descend:: dirbase
++ +@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME)
+
+ $(EXE_NAME) : $(ALL_OBJS)
+ $(LD_RULE)
+--- xharbour-1.0.0-beta1/config/lib.cf.orig 2003-08-25 20:24:52.000000000 +0400
++++ xharbour-1.0.0-beta1/config/lib.cf 2009-03-04 18:44:30.000000000 +0300
+@@ -44,11 +44,11 @@
+ endif
+ endif
+
+-descend :
+- @$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=NO' $(LIB_NAME)
++descend:: dirbase
++ +@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=NO' $(LIB_NAME)
+
+-descend_mt:
+- @$(MK) -C $(ARCH_DIR)_mt -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=YES' $(MT_LIB_NAME)
++descend_mt:: dirbase_mt
++ +@$(MK) -C $(ARCH_DIR)_mt -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=YES' $(MT_LIB_NAME)
+
+ $(LIB_NAME) : $(ALL_OBJS)
+ $(AR_RULE)
+--- xharbour-1.0.0-beta1/config/dir.cf.orig 2009-03-04 18:58:03.000000000 +0300
++++ xharbour-1.0.0-beta1/config/dir.cf 2009-03-04 19:01:17.000000000 +0300
+@@ -6,16 +6,73 @@
+ ifneq ($(HB_COMPILER),)
+
+ include $(TOP)$(ROOT)config/global.cf
++# this make version does not work correctly parallel execution rules below
++ifeq ($(MAKE_VERSION),3.79.1)
+ include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf
++endif
++
++ifeq ($(DIR_RULE),)
++
++# NOTE: The empty line directly before 'endef' HAVE TO exist!
++# It causes that every commands will be separated by LF
++define dir_mk
++$(MK) -C $(dir) $@
++
++endef
++
++DIRS_PURE = $(filter-out {%},$(subst {, {,$(DIRS)))
++DIRS_DEP = $(filter-out $(DIRS_PURE),$(DIRS))
++DIRS_MK = $(foreach d, $(DIRS_PURE), $(if $(wildcard $(d)/Makefile),$(d),))
++DIR_RULE = $(foreach dir, $(DIRS_MK), $(dir_mk))
++MULTI_DEPS = yes
++
++else
++
++DIRS := $(filter-out {%},$(subst {, {,$(DIRS)))
++MULTI_DEPS = no
++
++endif
+
+ all : first
+
++ifneq ($(MULTI_DEPS),yes)
++
+ first clean install::
+- $(DIR_RULE)
++ +$(DIR_RULE)
++
++else
++
++DIRS_CLEAN = $(foreach dir, $(DIRS_MK), $(dir).clean)
++DIRS_INST = $(foreach dir, $(DIRS_MK), $(dir).inst)
++
++first :: $(DIRS_MK)
++install :: $(DIRS_INST)
++clean :: $(DIRS_CLEAN)
++
++comma=,
++define dep_rule
++$(subst $(comma),$(2) ,$(subst },$(2),$(subst {,$(2)::|,$(1))))
++endef
++
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.clean)))
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.inst)))
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),)))
++
++$(DIRS_CLEAN) ::
++ +$(MK) -C $(@:.clean=) clean
++
++$(DIRS_INST) ::
++ +$(MK) -C $(@:.inst=) install
++
++$(DIRS_MK) ::
++ +$(MK) -C $(@)
++
++endif
++
+
+ ifneq ($(HB_POSTINST),)
+ install::
+- $(HB_POSTINST)
++ +$(HB_POSTINST)
+ endif
+
+ endif
+--- xharbour-1.0.0-beta1/source/Makefile.orig 2009-03-04 19:23:38.000000000 +0300
++++ xharbour-1.0.0-beta1/source/Makefile 2009-03-04 19:27:42.000000000 +0300
+@@ -23,26 +23,28 @@
+
+ else
+
++HB_COMP_REF={compiler}
++
+ DIRS=\
+ common \
+- pp \
+- compiler \
+- rtl \
+- vm \
++ pp{common} \
++ compiler{pp} \
++ rtl$(HB_COMP_REF) \
++ vm$(HB_COMP_REF) \
+ macro \
+ codepage \
+ lang \
+- rdd \
+- debug \
+- odbc \
+- ct \
++ rdd$(HB_COMP_REF) \
++ debug$(HB_COMP_REF) \
++ odbc$(HB_COMP_REF) \
++ ct$(HB_COMP_REF) \
+ misc \
+- cgi
++ cgi$(HB_COMP_REF)
+
+ ifneq ($(HB_ARCHITECTURE),dos)
+
+ DIRS+=\
+- tip
++ tip$(HB_COMP_REF)
+
+ endif
+
+--- xharbour-1.0.0-beta1/Makefile.orig 2004-09-15 00:15:12.000000000 +0400
++++ xharbour-1.0.0-beta1/Makefile 2009-03-04 19:33:50.000000000 +0300
+@@ -7,7 +7,7 @@
+ DIRS=\
+ include \
+ source \
+- utils \
++ utils{source} \
+ # tests \
+ # samples \
+
diff --git a/dev-lang/xharbour/files/xharbour-skip-static-utils.patch b/dev-lang/xharbour/files/xharbour-skip-static-utils.patch
new file mode 100644
index 000000000..133bc3d08
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-skip-static-utils.patch
@@ -0,0 +1,11 @@
+--- xharbour-1.0.0-beta1/Makefile.orig2 2009-03-04 19:33:50.000000000 +0300
++++ xharbour-1.0.0-beta1/Makefile 2009-03-05 12:30:40.000000000 +0300
+@@ -7,7 +7,7 @@
+ DIRS=\
+ include \
+ source \
+- utils{source} \
++# utils{source} \
+ # tests \
+ # samples \
+