Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 123975 | Differences between
and this patch

Collapse All | Expand All

(-)xharbour-1.0.0-beta1/bin/hb-func.sh.orig (-17 / +59 lines)
Lines 324-336 Link Here
324
fi
324
fi
325
[ -n "\${HB_GPM_LIB}" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -l\${HB_GPM_LIB}"
325
[ -n "\${HB_GPM_LIB}" ] && SYSTEM_LIBS="\${SYSTEM_LIBS} -l\${HB_GPM_LIB}"
326
326
327
if [ "\${HB_STATIC}" = "full" ]; then
327
328
    SYSTEM_LIBS="\${SYSTEM_LIBS} -ldl"
328
if [ "\${HB_STATIC}" = "no" ]; then
329
    if [ "\${HB_ARCHITECTURE}" = "linux" ]; then
329
    SYSTEM_LIBS=""
330
        SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread"
331
    fi
332
    LN_OPT="\${LN_OPT} -static"
333
    HB_STATIC="yes"
334
fi
330
fi
335
331
336
if [ "\${HB_XBGTK}" = "yes" ]; then
332
if [ "\${HB_XBGTK}" = "yes" ]; then
Lines 339-344 Link Here
339
    SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0 --libs libgnomeprint-2.2\`"
335
    SYSTEM_LIBS="\${SYSTEM_LIBS} \`pkg-config --libs gtk+-2.0 --libs libgnomeprint-2.2\`"
340
fi
336
fi
341
337
338
if [ "\${HB_STATIC}" = "full" ]; then
339
    if [ "\${HB_ARCHITECTURE}" = "linux" ]; then
340
        SYSTEM_LIBS="\${SYSTEM_LIBS} -lpthread -ldl"
341
    fi
342
    LN_OPT="\${LN_OPT} -static"
343
    HB_STATIC="yes"
344
fi
345
342
HB_LNK_REQ=""
346
HB_LNK_REQ=""
343
for gt in \${HB_GT_REQ}; do
347
for gt in \${HB_GT_REQ}; do
344
    if [ "\${HB_STATIC}" = "yes" ] || [ "\${gt}" = "ALLEG" ]; then
348
    if [ "\${HB_STATIC}" = "yes" ] || [ "\${gt}" = "ALLEG" ]; then
Lines 534-540 Link Here
534
538
535
mk_hblibso()
539
mk_hblibso()
536
{
540
{
537
    local LIBS LIBSMT l lm ll hb_rootdir hb_ver hb_libs full_lib_name full_lib_name_mt linker_options
541
    local LIBS LIBSMT l lm ll hb_rootdir hb_ver hb_libs full_lib_name full_lib_name_mt linker_options linker_mtoptions gpm
538
542
539
    name=`get_solibname`
543
    name=`get_solibname`
540
    hb_rootdir="${1-.}"
544
    hb_rootdir="${1-.}"
Lines 546-551 Link Here
546
    (cd $HB_LIB_INSTALL
550
    (cd $HB_LIB_INSTALL
547
    LIBS=""
551
    LIBS=""
548
    LIBSMT=""
552
    LIBSMT=""
553
    gpm="${HB_GPM_MOUSE}"
554
    linker_options="-lm"
555
    linker_mtoptions=""
556
    if [ "${HB_COMPILER}" = "mingw32" ]; then
557
        linker_options="${linker_options} -luser32 -lwinspool -lgdi32 -lcomctl32 -lcomdlg32 -lole32 -loleaut32 -luuid -lwsock32 -lws2_32"
558
    elif [ "${HB_COMPILER}" = "mingwce" ]; then
559
        linker_options="${linker_options} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32"
560
    elif [ "${HB_COMPILER}" = "djgpp" ]; then
561
        linker_options="${linker_options}"
562
    elif [ "${HB_ARCHITECTURE}" = "linux" ]; then
563
        linker_options="${linker_options} -ldl -lrt"
564
        linker_mtoptions="${linker_mtoptions} -lpthread"
565
    elif [ "${HB_ARCHITECTURE}" = "sunos" ]; then
566
        linker_options="${linker_options} -lrt -lsocket -lnsl -lresolv"
567
        linker_mtoptions="${linker_mtoptions} -lpthread"
568
    elif [ "${HB_ARCHITECTURE}" = "hpux" ]; then
569
        linker_options="${linker_options} -lrt"
570
        linker_mtoptions="${linker_mtoptions} -lpthread"
571
    elif [ "${HB_ARCHITECTURE}" = "bsd" ]; then
572
        linker_options="$-L/usr/local/lib {linker_options}"
573
        linker_mtoptions="${linker_mtoptions} -lpthread"
574
    elif [ "${HB_ARCHITECTURE}" = "darwin" ]; then
575
        linker_options="-L/sw/lib -L/opt/local/lib ${linker_options}"
576
        linker_mtoptions="${linker_mtoptions} -lpthread"
577
    fi
578
549
    for l in ${hb_libs}
579
    for l in ${hb_libs}
550
    do
580
    do
551
        case $l in
581
        case $l in
Lines 562-582 Link Here
562
                   [ "${l#gt}" = "${l}" ] || \
592
                   [ "${l#gt}" = "${l}" ] || \
563
                   [ "${l}" = "${HB_GT_LIB}" ]
593
                   [ "${l}" = "${HB_GT_LIB}" ]
564
                then
594
                then
565
                    if [ -f $ls ]
566
                    then
567
                        LIBS="$LIBS $ls"
568
                    fi
569
                    if [ -f $lm ]
595
                    if [ -f $lm ]
570
                    then
596
                    then
571
                        LIBSMT="$LIBSMT $lm"
597
                        LIBSMT="$LIBSMT $lm"
572
                    fi
598
                    fi
573
                    if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
599
                    if [ -f $ls ]
600
                    then
601
                        LIBS="$LIBS $ls"
574
                        if [ "${l}" = gtcrs ]; then
602
                        if [ "${l}" = gtcrs ]; then
575
                            linker_options="$linker_options -lncurses"
603
                            if [ "${HB_ARCHITECTURE}" = "sunos" ]; then
604
                                linker_options="$linker_options -lcurses"
605
                            else
606
                                linker_options="$linker_options -lncurses"
607
                            fi
576
                        elif [ "${l}" = gtsln ]; then
608
                        elif [ "${l}" = gtsln ]; then
577
                            if [ "${HB_WITHOUT_GTSLN}" != "yes" ]; then
609
                            if [ "${HB_WITHOUT_GTSLN}" != "yes" ]; then
578
                                linker_options="$linker_options -lslang"
610
                                linker_options="$linker_options -lslang"
579
                            fi
611
                            fi
612
                        elif [ "${l}" = gtxwc ]; then
613
                            [ -d "/usr/X11R6/lib" ] && \
614
                                linker_options="$linker_options -L/usr/X11R6/lib"
615
                            [ -d "/usr/X11R6/lib64" ] && \
616
                                linker_options="$linker_options -L/usr/X11R6/lib64"
617
                            linker_options="$linker_options -lX11"
618
                        fi
619
                        if [ "${gpm}" = yes ] && ( [ "${l}" = gtcrs ] || \
620
                           [ "${l}" = gtsln ] || [ "${l}" = gttrm ] ); then
621
                            linker_options="$linker_options -lgpm"
622
                            gpm=""
580
                        fi
623
                        fi
581
                    fi
624
                    fi
582
                fi
625
                fi
Lines 586-592 Link Here
586
    if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
629
    if [ "${HB_ARCHITECTURE}" = "darwin" ]; then
587
        full_lib_name="lib${name}.${hb_ver}.dylib"
630
        full_lib_name="lib${name}.${hb_ver}.dylib"
588
        full_lib_name_mt="lib${name}mt.${hb_ver}.dylib"
631
        full_lib_name_mt="lib${name}mt.${hb_ver}.dylib"
589
        linker_options="-L/sw/lib -L/opt/local/lib $linker_options"
590
    elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
632
    elif [ "${HB_ARCHITECTURE}" = "w32" ]; then
591
        full_lib_name="${name}.dll"
633
        full_lib_name="${name}.dll"
592
        full_lib_name_mt="${name}mt.dll"
634
        full_lib_name_mt="${name}mt.dll"
Lines 595-604 Link Here
595
        full_lib_name_mt="lib${name}mt-${hb_ver}.so"
637
        full_lib_name_mt="lib${name}mt-${hb_ver}.so"
596
    fi
638
    fi
597
    echo "Making ${full_lib_name}..."
639
    echo "Making ${full_lib_name}..."
598
    $HB_BIN_INSTALL/hb-mkslib ${full_lib_name} $LIBS ${linker_options}
640
    $HB_BIN_INSTALL/hb-mkslib ${full_lib_name} ${LIBS} ${linker_options}
599
    if [ "$HB_MT" = "MT" ]; then
641
    if [ "$HB_MT" = "MT" ]; then
600
        echo "Making ${full_lib_name_mt}..."
642
        echo "Making ${full_lib_name_mt}..."
601
        $HB_BIN_INSTALL/hb-mkslib ${full_lib_name_mt} $LIBSMT ${linker_options}
643
        $HB_BIN_INSTALL/hb-mkslib ${full_lib_name_mt} ${LIBSMT} ${linker_mtoptions} ${linker_options}
602
    fi
644
    fi
603
    for l in ${full_lib_name} ${full_lib_name_mt}
645
    for l in ${full_lib_name} ${full_lib_name_mt}
604
    do
646
    do

Return to bug 123975