summaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-06-29 19:43:58 +0000
committerjlam <jlam@pkgsrc.org>2003-06-29 19:43:58 +0000
commit342ad4c6f67dc2ca5a81579698dec52361ddc6a3 (patch)
tree3aaa08fb1caa9776eb6a4db6d2e66833a18e1efa /converters
parent4845a552137cf267e1c21a9d4d68274718d4067c (diff)
downloadpkgsrc-342ad4c6f67dc2ca5a81579698dec52361ddc6a3.tar.gz
Back out previous change and institute another fix for the reported
problem. The symptoms appear to match the situation where a library exists in /usr/lib that matches the name of the pkgsrc-installed library, but the corresponding .la file doesn't exist in /usr/lib. Fix this by using building a fake libtool archive if we use the system library.
Diffstat (limited to 'converters')
-rw-r--r--converters/libiconv/buildlink2.mk26
1 files changed, 19 insertions, 7 deletions
diff --git a/converters/libiconv/buildlink2.mk b/converters/libiconv/buildlink2.mk
index 5afd9de847a..a4c24bad749 100644
--- a/converters/libiconv/buildlink2.mk
+++ b/converters/libiconv/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.6 2003/06/29 11:19:09 wiz Exp $
+# $NetBSD: buildlink2.mk,v 1.7 2003/06/29 19:43:58 jlam Exp $
.if !defined(ICONV_BUILDLINK2_MK)
ICONV_BUILDLINK2_MK= # defined
@@ -12,7 +12,7 @@ BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv
_NEED_ICONV= YES
_BLNK_LIBICONV_FOUND= NO
.else
-. if exists(/usr/include/iconv.h) && exists(/usr/lib/libiconv.so)
+. if exists(/usr/include/iconv.h)
_NEED_ICONV= NO
_BLNK_LIBICONV_LIST!= ${ECHO} /usr/lib/libiconv.*
. if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*"
@@ -37,25 +37,37 @@ _NEED_ICONV= YES
BUILDLINK_PACKAGES+= iconv
EVAL_PREFIX+= BUILDLINK_PREFIX.iconv=libiconv
BUILDLINK_PREFIX.iconv_DEFAULT= ${LOCALBASE}
-BUILDLINK_LIBICONV_LDADD= -L${BUILDLINK_PREFIX.iconv}/lib
-BUILDLINK_LIBICONV_LDADD+= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.iconv}/lib
-BUILDLINK_LIBICONV_LDADD+= -liconv
+_BLNK_ICONV_LDFLAGS= -L${BUILDLINK_PREFIX.iconv}/lib -liconv
+BUILDLINK_LIBICONV_LDADD= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.iconv}/lib
+BUILDLINK_LIBICONV_LDADD+= ${_BLNK_ICONV_LDFLAGS}
.else
BUILDLINK_PREFIX.iconv= /usr
. if ${_BLNK_LIBICONV_FOUND} == "YES"
-BUILDLINK_LIBICONV_LDADD= -liconv
+_BLNK_ICONV_LDFLAGS= -liconv
. else
-BUILDLINK_LIBICONV_LDADD= # empty
+_BLNK_ICONV_LDFLAGS= # empty
. endif
+BUILDLINK_LIBICONV_LDADD= -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.iconv}/lib
.endif
+LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \
+ -e "s|${BUILDLINK_PREFIX.iconv}/lib/libiconv.la|${_BLNK_ICONV_LDFLAGS}|g" \
+ -e "s|${LOCALBASE}/lib/libiconv.la|${_BLNK_ICONV_LDFLAGS}|g" \
+
BUILDLINK_FILES.iconv= include/iconv.h
BUILDLINK_FILES.iconv+= include/libcharset.h
BUILDLINK_FILES.iconv+= lib/libcharset.*
BUILDLINK_FILES.iconv+= lib/libiconv.*
BUILDLINK_TARGETS+= iconv-buildlink
+BUILDLINK_TARGETS+= iconv-libiconv-la
iconv-buildlink: _BUILDLINK_USE
+iconv-libiconv-la:
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ lafile="${BUILDLINK_DIR}/lib/libiconv.la"; \
+ libpattern="${BUILDLINK_PREFIX.iconv}/lib/libiconv.*"; \
+ ${BUILDLINK_FAKE_LA}
+
.endif # ICONV_BUILDLINK2_MK