Subject: iconv and Linux and abiword
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/26/2004 18:17:33
Can we add PREFER_* options to mk/platform/*mk files?
For example, it could be nice for mk/platform/Linux.mk to have:
# GNU libc usually provides a good enough iconv
PREFER_NATIVE+= iconv
I have PREFER_PKGSRC=YES so converters/libiconv/builtin.mk ends up
skipping the Linux check. I want to have PREFER_PKGSRC=YES while using
PREFER_NATIVE+=iconv.
My workaround is
--- converters/libiconv/builtin.mk 28 Aug 2004 06:05:31 -0000 1.6
+++ converters/libiconv/builtin.mk 27 Oct 2004 01:16:14 -0000
@@ -55,6 +55,15 @@
BUILDLINK_VARS+= IS_BUILTIN.iconv
.endif # IS_BUILTIN.iconv
+.if (${OPSYS} == "Linux") && exists(${_ICONV_H})
+USE_BUILTIN.iconv!= \
+ if ${GREP} -q "This file is part of the GNU C Library" ${_ICONV_H}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+.endif
+
.if !defined(USE_BUILTIN.iconv)
USE_BUILTIN.iconv?= ${IS_BUILTIN.iconv}
PREFER.iconv?= pkgsrc
(But that is not correct because now it always overrides PREFER_* I
think.)
Also, what specific feature (or function) does abiword require of GNU
libiconv?
Anyways, I use abiword (various versions) under Linux using GNU libc that
provides iconv. I don't need nor have any GNU iconv installed.
Our pkgsrc doesn't allow converters/iconv
--- editors/abiword/Makefile.common 21 Oct 2004 06:30:39 -0000 1.1
+++ editors/abiword/Makefile.common 27 Oct 2004 00:23:49 -0000
@@ -23,7 +23,10 @@
USE_PERL5= run
USE_X11= yes
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} != "Linux" # iconv is not needed for Linux; it is included in glibc
USE_BUILTIN.iconv= no # Make sure we get libiconv dependency.
+.endif
CONFIGURE_ARGS+= --enable-threads
CONFIGURE_ARGS+= --with-libxml2
Jeremy C. Reed