termux-packages/packages/qpdf/rpath.patch
2021-09-18 20:27:45 +01:00

91 lines
2.7 KiB
Diff

diff --git a/autoconf.mk.in b/autoconf.mk.in
index 2836b4f1..cbf57efc 100644
--- a/autoconf.mk.in
+++ b/autoconf.mk.in
@@ -23,7 +23,6 @@ LIBS=@LIBS@
CPPFLAGS=@CPPFLAGS@
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ $(CXXWFLAGS) $(WFLAGS)
-RPATH=@RPATH@
AR=@AR@
RANLIB=@RANLIB@
DLLTOOL=@DLLTOOL@
diff --git a/autofiles.sums b/autofiles.sums
index 956715ab..e155a8a2 100644
--- a/autofiles.sums
+++ b/autofiles.sums
@@ -1,4 +1,4 @@
-285564a8480dcb79d7b42bf92c1919289b12238865a9d73aa3355277b1f46dc8 configure.ac
+428dcebb36fbe0a150f99f7ee72c82b705a69f47c05565a7d1ed30aa88b81167 configure.ac
d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4
c12d837479fa9a3fa4c278b6dc7d6b449503d663e0f0d294305595a51ff43f70 libqpdf/qpdf/qpdf-config.h.in
5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4
diff --git a/configure b/configure
index 3118deed..7e715abf 100755
--- a/configure
+++ b/configure
@@ -670,7 +670,6 @@ PKG_CONFIG
WINDOWS_WORDSIZE
IS_32BIT
RANDOM_DEVICE
-RPATH
LT_SONAME
LT_AGE
LT_REVISION
@@ -16353,10 +16352,17 @@ fi
if test "$qpdf_USE_RPATH" = "1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- RPATH='-rpath $(libdir)'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+ if test "${hardcode_libdir_flag_spec/rpath/}" != "$hardcode_libdir_flag_spec"; then
+ hardcode_libdir_flag_spec=
+ fi
+ runpath_var=
+ if test "${hardcode_libdir_flag_spec_CXX/rpath/}" != "$hardcode_libdir_flag_spec_CXX"; then
+ hardcode_libdir_flag_spec_CXX=
+ fi
+ runpath_var_CXX=
fi
diff --git a/configure.ac b/configure.ac
index 612a049b..ace0543f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,11 +72,17 @@ AC_ARG_ENABLE(rpath,
fi], [qpdf_USE_RPATH=1])
if test "$qpdf_USE_RPATH" = "1"; then
AC_MSG_RESULT(yes)
- RPATH='-rpath $(libdir)'
else
AC_MSG_RESULT(no)
+ if test "${hardcode_libdir_flag_spec/rpath/}" != "$hardcode_libdir_flag_spec"; then
+ hardcode_libdir_flag_spec=
+ fi
+ runpath_var=
+ if test "${hardcode_libdir_flag_spec_CXX/rpath/}" != "$hardcode_libdir_flag_spec_CXX"; then
+ hardcode_libdir_flag_spec_CXX=
+ fi
+ runpath_var_CXX=
fi
-AC_SUBST(RPATH)
AC_MSG_CHECKING(for -fvisibility=hidden)
try_flags=-fvisibility=hidden
diff --git a/make/libtool.mk b/make/libtool.mk
index 2ff96f86..c9ed6b3b 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -95,7 +95,7 @@ define makelib
$(LIBTOOL) --mode=link --tag=CXX \
$(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
-o $(2) $(1) $(3) $(4) \
- $(RPATH) -version-info $(5):$(6):$(7) -no-undefined
+ -rpath $(libdir) -version-info $(5):$(6):$(7) -no-undefined
endef
# 1 2 3 4 5