[BACK]Return to patch-ae CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / x11 / blt / patches

File: [cvs.NetBSD.org] / pkgsrc / x11 / blt / patches / patch-ae (download)

Revision 1.8, Sat Jan 1 15:21:14 2022 UTC (2 years, 1 month ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1
Changes since 1.7: +6 -6 lines

blt: fix relro build on *BSD

Remove NetBSD 1.5/1.6 specific code.

Bump PKGREVISION.

$NetBSD: patch-ae,v 1.8 2022/01/01 15:21:14 wiz Exp $

--- configure.orig	2002-10-04 05:33:59.000000000 +0000
+++ configure
@@ -3384,8 +3384,8 @@ case $target in
     TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
     ;;
   *)
-    TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
-    TK_LIB_NAME="tk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
+    TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
+    TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
     ;;
 esac
 
@@ -4072,7 +4071,8 @@ fi
     EXTRA_LIB_SPECS="-ldl"
     ;;
 
-  *-netbsd*|*-freebsd*|*-openbsd*)
+  *-netbsd*|*-freebsd*|*-openbsd*|*-dragonfly*)
+    EXTRA_LIB_SPECS="$PTHREAD_LDFLAGS"
     # Not available on all versions:  check for include file.
     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
@@ -4109,9 +4109,10 @@ test_ok=no
 fi
 
     if test "$test_ok" = yes; then
+      LDFLAGS="-L${prefix}/lib -L${X11BASE}/lib -Wl,-R${prefix}/lib -Wl,-R${X11BASE}/lib ${LDF}"
       SHLIB_CFLAGS="-fpic"
       SHLIB_LD="ld"
-      SHLIB_LD_FLAGS="-Bshareable -x"
+      SHLIB_LD_FLAGS="-Bshareable -x -R${prefix}/lib -R${X11BASE}/lib ${LDF}"
     fi
     ;;
 
@@ -4181,9 +4182,9 @@ fi
   *-solaris2*)
 
     SHLIB_CFLAGS="-KPIC"
-    if test "${blt_with_gnu_ld}" = "yes" -a "$blt_have_gcc" = "yes" ; then
+    if test "$blt_have_gcc" = "yes" ; then
       SHLIB_LD="gcc"
-      SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
+      SHLIB_LD_FLAGS='-shared -Wl,-soname,$@'
       LD_RUN_PATH="-Wl,-rpath,${loader_run_path}"
     else
       SHLIB_LD="/usr/ccs/bin/ld"