pkgsrc/lang/clisp/patches/patch-aa
2019-11-02 17:02:56 +00:00

107 lines
5.1 KiB
Text

$NetBSD: patch-aa,v 1.20 2019/11/02 17:02:56 rillig Exp $
Override library subdirectory name for consistency.
Don't use cache file to avoid trailing space problem.
Support staged installation of modules.
Fix SunOS linking.
https://mail-index.netbsd.org/pkgsrc-users/2019/11/02/msg029846.html
https://sourceforge.net/p/clisp/bugs/740/ (macOS build failure)
--- src/makemake.in.orig 2010-07-07 15:15:35.000000000 +0000
+++ src/makemake.in
@@ -577,8 +577,8 @@
CROSS=false
if [ -z "$HSYS" ]; then # not win32gcc
# some shells (A/UX and OSF/1) need the parentheses around "arch" below.
- HSYS=`((arch) 2>/dev/null || uname -m 2>/dev/null) | $tolower` # system name in lowercase
- HSYSOS=`((uname) 2>/dev/null || arch 2>/dev/null) | $tolower` # OS name in lowercase
+ HSYS=`( (arch) 2>/dev/null || uname -m 2>/dev/null) | $tolower` # system name in lowercase
+ HSYSOS=`( (uname) 2>/dev/null || arch 2>/dev/null) | $tolower` # OS name in lowercase
if [ "$HSYS" = 386bsd -o "$HSYS" = sun386 -o "$HSYS" = "386/at" -o "$HSYS" = i86pc ] ; then
HSYS='i386'
fi
@@ -1416,42 +1416,42 @@ if [ "${with_dynamic_modules}" != no ];
XCC_PICFLAG=''
;;
esac
- XCC_CREATESHARED='create-shared-lib -o $lib $libs' # dummy command
+ XCC_CREATESHARED='create-shared-lib -o "${DESTDIR}$lib" $libs' # dummy command
case "$host_os" in
freebsd2.2*)
- XCC_CREATESHARED='ld -Bshareable -o $lib $libs /usr/lib/c++rt0.o'
+ XCC_CREATESHARED='ld -Bshareable -o "${DESTDIR}$lib" $libs /usr/lib/c++rt0.o'
;;
freebsd2* | netbsd* | openbsd*)
- XCC_CREATESHARED='ld -Bshareable -o $lib $libs'
+ XCC_CREATESHARED='ld -Bshareable -o "${DESTDIR}$lib" $libs'
;;
freebsd3* | gnu* | linux* | cygwin* | mingw* | k*bsd* | dragonfly*)
- XCC_CREATESHARED='${CC} ${CFLAGS} ${CLFLAGS} -shared -o $lib $libs'
+ XCC_CREATESHARED='${CC} ${CFLAGS} ${CLFLAGS} -shared -o "${DESTDIR}$lib" $libs'
;;
hpux9* | hpux10*)
- XCC_CREATESHARED='ld -b +s -o $lib $libs'
+ XCC_CREATESHARED='ld -b +s -o "${DESTDIR}$lib" $libs'
;;
irix5* | irix6*)
case " $CC $CFLAGS " in
- *" -32 "*) XCC_CREATESHARED='ld -32 -shared -o $lib $libs' ;;
- *" -n32 "*) XCC_CREATESHARED='ld -n32 -shared -o $lib $libs' ;;
- *" -64 "*) XCC_CREATESHARED='ld -64 -shared -o $lib $libs' ;;
- *) XCC_CREATESHARED='ld -shared -o $lib $libs' ;;
+ *" -32 "*) XCC_CREATESHARED='ld -32 -shared -o "${DESTDIR}$lib" $libs' ;;
+ *" -n32 "*) XCC_CREATESHARED='ld -n32 -shared -o "${DESTDIR}$lib" $libs' ;;
+ *" -64 "*) XCC_CREATESHARED='ld -64 -shared -o "${DESTDIR}$lib" $libs' ;;
+ *) XCC_CREATESHARED='ld -shared -o "${DESTDIR}$lib" $libs' ;;
esac
;;
osf3* | osf4*)
- XCC_CREATESHARED='ld -shared -expect_unresolved -o $lib $libs -lc'
+ XCC_CREATESHARED='ld -shared -expect_unresolved -o "${DESTDIR}$lib" $libs -lc'
;;
sco3.2v5*)
- XCC_CREATESHARED='ld -G -o $lib $libs'
+ XCC_CREATESHARED='ld -G -o "${DESTDIR}$lib" $libs'
;;
solaris2*)
- XCC_CREATESHARED='ld -G -z text -o $lib $libs'
+ XCC_CREATESHARED='ld -G -z text -o "${DESTDIR}$lib" $libs'
;;
sunos4*)
- XCC_CREATESHARED='ld -assert pure-text -Bstatic -o $lib $libs'
+ XCC_CREATESHARED='ld -assert pure-text -Bstatic -o "${DESTDIR}$lib" $libs'
;;
darwin*)
- XCC_CREATESHARED='${CC} -bundle -flat_namespace -undefined suppress -o $lib $libs'
+ XCC_CREATESHARED='${CC} -bundle -flat_namespace -undefined suppress -o "${DESTDIR}$lib" $libs'
;;
*) echo "$0: how do you create a shared library on ${host_os}?" >&2;
;;
@@ -1542,7 +1542,7 @@ if [ $CROSS = false ] ; then
# Newer versions of Solaris (Solaris 2.2 and newer) don't have
# libdl_stubs.a any more. This means that you cannot link -static !
XCLFLAGS=`echol "$XCLFLAGS" | sed -e 's/-B*static//g'`
- SOLARIS_LINKING=1 # Even more hacks needed??
+ SOLARIS_LINKING= # Even more hacks needed??
BINARY_DISTRIB=1
;;
hpux*)
@@ -1917,7 +1917,7 @@ echol "htmldir = ${HTMLDIR}"
echol "psdir = ${PSDIR}"
echol "pdfdir = ${PDFDIR}"
echol "libdir = ${LIBDIR}"
-echol "lisplibdir = \$(libdir)${NEXT_}\$(TOPDIR)"
+echol "lisplibdir = \$(libdir)${NEXT_}clisp"
test -n "$USE_GETTEXT" && echol "localedir = ${LOCALEDIR}"
echol "elispdir = ${ELISPDIR}"
echol "vimdir = ${VIMDIR}"
@@ -3315,7 +3315,7 @@ for var in ${PRECIOUS_VARS}; do
done
# we must use $(SHELL) for sub-configures because when the top CONFIG_SHELL
# is bash, config.cache may be unparsable with sh on Solaris
-echotab " \$(SHELL) \$\$m/configure --with-clisp=\"${HEREP}/clisp -K boot ${someflags}\" --cache-file=\$\${cache} --srcdir=\$\$m \$(MODULE_CONFIGURE_FLAGS);\\"
+echotab " \$(SHELL) \$\$m/configure --with-clisp=\"${HEREP}/clisp -K boot ${someflags}\" --srcdir=\$\$m \$(MODULE_CONFIGURE_FLAGS);\\"
echotab " else \\"
echotab " \$(SHELL) \$\$m/configure --srcdir=\$\$m \$(MODULE_CONFIGURE_FLAGS); \\"
echotab " fi ) ;\\"