diff options
Diffstat (limited to 'dev-lang/xharbour/files/xharbour-as-needed.patch')
-rw-r--r-- | dev-lang/xharbour/files/xharbour-as-needed.patch | 138 |
1 files changed, 138 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 |