summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2013-09-02 05:41:50 +0000
committerbsam <bsam@FreeBSD.org>2013-09-02 05:41:50 +0000
commit76068bedb30bd66dfe3e9cc6d7d202042d4f871c (patch)
tree329b9860cec2b8bc443912ad4a52d7732ffc9db3
parentc2ec996ddec2412e5140b829f58ba8dd3bb0a038 (diff)
downloadFreeBSD-ports-76068bedb30bd66dfe3e9cc6d7d202042d4f871c.zip
FreeBSD-ports-76068bedb30bd66dfe3e9cc6d7d202042d4f871c.tar.gz
1. Introduce using iconv with arguments:
. lib (default, implicit); . build, . patch. The default is the same, all existing ports stay valid. 2. Introduce variable ICONV_CMD with default to ${LOCALBASE}/bin/iconv. It is intended to get the value of /usr/bin/iconv at recent 10.x. 3. Adopt all ports to using USES+= icomv:build and iconv:patch and change iconv (executable) at Makefile commands to ${ICONV_CMD} at those ports. Submitted by: bsam (me, via e-mail) Approved by: portmgr (bapt)
-rw-r--r--Mk/Uses/iconv.mk16
-rw-r--r--devel/common_lib/Makefile6
-rw-r--r--devel/liblangtag/Makefile3
-rw-r--r--emulators/vice/Makefile5
-rw-r--r--hebrew/hunspell/Makefile4
-rw-r--r--japanese/gjiten/Makefile4
-rw-r--r--japanese/platex-japanese/Makefile6
-rw-r--r--sysutils/djmount/Makefile3
-rw-r--r--ukrainian/hunspell/Makefile4
9 files changed, 25 insertions, 26 deletions
diff --git a/Mk/Uses/iconv.mk b/Mk/Uses/iconv.mk
index f17ac11..60ee2f7 100644
--- a/Mk/Uses/iconv.mk
+++ b/Mk/Uses/iconv.mk
@@ -5,17 +5,25 @@
# MAINTAINER: portmgr@FreeBSD.org
#
# Feature: iconv
-# Usage: USES=iconv
-# Valid ARGS: does not require args
+# Usage: USES=iconv or USES=iconv:ARGS
+# Valid ARGS: lib (default, implicit), build, patch
#
#
.if !defined(_INCLUDE_USES_ICONV_MK)
_INCLUDE_USES_ICONV_MK= yes
-.if defined(iconv_ARGS)
-IGNORE= USES=iconv does not require args
+ICONV_CMD= ${LOCALBASE}/bin/iconv
+
+.if !defined(iconv_ARGS)
+iconv_ARGS= lib
.endif
+.if ${iconv_ARGS} == "lib"
LIB_DEPENDS+= libiconv.so.3:${PORTSDIR}/converters/libiconv
+.elif ${iconv_ARGS} == "build"
+BUILD_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
+.elif ${iconv_ARGS} == "patch"
+PATCH_DEPENDS+= ${ICONV_CMD}:${PORTSDIR}/converters/libiconv
+.endif
.endif
diff --git a/devel/common_lib/Makefile b/devel/common_lib/Makefile
index cb2d539..1d79b9b 100644
--- a/devel/common_lib/Makefile
+++ b/devel/common_lib/Makefile
@@ -9,8 +9,7 @@ MAINTAINER= olgeni@FreeBSD.org
COMMENT= Library of commonly used Erlang functions
BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang \
- txt2tags:${PORTSDIR}/textproc/txt2tags \
- iconv:${PORTSDIR}/converters/libiconv
+ txt2tags:${PORTSDIR}/textproc/txt2tags
RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang
PLIST_SUB= VERSION="${PORTVERSION}"
@@ -24,6 +23,7 @@ GH_TAGNAME= ${PORTVERSION}
USE_GMAKE= yes
USE_DOS2UNIX= Makefile
ALL_TARGET= compile doc
+USES= iconv:build
MAN1= common_lib.1
MAN3= cl_application.3 cl_binary.3 cl_calendar.3 cl_consumer.3 \
@@ -37,7 +37,7 @@ post-extract:
do-install:
.for manpage in ${MAN1} ${MAN3}
- @iconv -f UTF-8 -t ISO-8859-1 ${WRKSRC}/doc/man/${manpage} > ${WRKSRC}/doc/man/${manpage}.iconv
+ @${ICONV_CMD} -f UTF-8 -t ISO-8859-1 ${WRKSRC}/doc/man/${manpage} > ${WRKSRC}/doc/man/${manpage}.iconv
.endfor
.for manpage in ${MAN1}
@${INSTALL_MAN} ${WRKSRC}/doc/man/${manpage}.iconv ${MAN1PREFIX}/man/man1/${manpage}
diff --git a/devel/liblangtag/Makefile b/devel/liblangtag/Makefile
index 45c710c..7ede75c 100644
--- a/devel/liblangtag/Makefile
+++ b/devel/liblangtag/Makefile
@@ -13,7 +13,6 @@ COMMENT= An interface library to access tags for identifying languages
LICENSE= LGPL3 MPL
LICENSE_COMB= dual
-BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
LIB_DEPENDS= xml2:${PORTSDIR}/textproc/libxml2
GNU_CONFIGURE= yes
@@ -21,7 +20,7 @@ USE_AUTOTOOLS= libtool
USE_BZIP2= yes
USE_GMAKE= yes
USE_LDCONFIG= yes
-USES= pathfix pkgconfig
+USES= iconv:build pathfix pkgconfig
CONFIGURE_ARGS= --disable-introspection
diff --git a/emulators/vice/Makefile b/emulators/vice/Makefile
index 3c90ef7..b7b0b2f 100644
--- a/emulators/vice/Makefile
+++ b/emulators/vice/Makefile
@@ -105,8 +105,7 @@ LIB_DEPENDS+= avcodec:${PORTSDIR}/multimedia/ffmpeg
.endif
.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-PATCH_DEPENDS+= ${LOCALBASE}/bin/iconv:${PORTSDIR}/converters/libiconv
+USES+= gettext iconv:patch
CONFIGURE_ARGS+= --enable-nls --localedir=${LOCALBASE}/share/locale
# causes vice to crash:
#LDFLAGS+= -lgettextlib
@@ -139,7 +138,7 @@ post-patch:
${WRKSRC}/configure
.for i in da.po de.po fr.po hu.po it.po nl.po pl.po sv.po tr.po
${MV} "${WRKSRC}/po/${i}" "${WRKSRC}/po/${i}.latin"
- ${LOCALBASE}/bin/iconv -f latin1 -t utf-8 < "${WRKSRC}/po/${i}.latin" > "${WRKSRC}/po/${i}"
+ ${ICONV_CMD} -f latin1 -t utf-8 < "${WRKSRC}/po/${i}.latin" > "${WRKSRC}/po/${i}"
.endfor
.if ! ${PORT_OPTIONS:MDOCS}
${REINPLACE_CMD} -e 's| doc||' ${WRKSRC}/Makefile.in
diff --git a/hebrew/hunspell/Makefile b/hebrew/hunspell/Makefile
index c6ff7a3..58cda12 100644
--- a/hebrew/hunspell/Makefile
+++ b/hebrew/hunspell/Makefile
@@ -16,9 +16,7 @@ DIST_SUBDIR= ${PORTNAME}
MAINTAINER= office@FreeBSD.org
COMMENT= Hebrew hunspell dictionaries
-BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
-
-USES= perl5
+USES= iconv:build perl5
ALL_TARGET= hunspell
CONFIGURE_ARGS= --enable-fatverb
GNU_CONFIGURE= yes
diff --git a/japanese/gjiten/Makefile b/japanese/gjiten/Makefile
index e18e488..3f3b95a 100644
--- a/japanese/gjiten/Makefile
+++ b/japanese/gjiten/Makefile
@@ -46,7 +46,7 @@ RUN_DEPENDS+= ${EDICT_FILE}:${PORTSDIR}/japanese/edict-utf-8
EDICT_DIR= ${LOCALBASE}/share/dict/edict
EDICT_FILE= ${EDICT_DIR}/edict
RUN_DEPENDS+= ${EDICT_FILE}:${PORTSDIR}/japanese/edict
-BUILD_DEPENDS+= ${LOCALBASE}/bin/iconv:${PORTSDIR}/converters/libiconv
+USES+= iconv:build
.endif
DICTIONARIES= kanjidic edict compdic
@@ -72,7 +72,7 @@ post-install:
.endfor
.else
.for f in ${DICTIONARIES}
- ${LOCALBASE}/bin/iconv -c -f EUC-JP -t UTF-8 ${EDICT_DIR}/${f} > ${GJITEN_DICS}/${f}
+ ${ICONV_CMD} -c -f EUC-JP -t UTF-8 ${EDICT_DIR}/${f} > ${GJITEN_DICS}/${f}
.endfor
.endif
-@update-desktop-database
diff --git a/japanese/platex-japanese/Makefile b/japanese/platex-japanese/Makefile
index 4898c7e..2fe06d4 100644
--- a/japanese/platex-japanese/Makefile
+++ b/japanese/platex-japanese/Makefile
@@ -18,10 +18,9 @@ DIST_SUBDIR= latex
MAINTAINER= yokota@res.otaru-uc.ac.jp
COMMENT= pLaTeX package that literally provides Japanese option to babel
-BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
-
USE_ZIP= yes
USE_TEX= latex ptex
+USES= iconv:build
TEXMFDIR= share/texmf
STYDIR= tex/generic/babel
@@ -33,7 +32,6 @@ SAMPLEFILE= sample.tex
PDFFILE= sample.pdf
TEXTFILE= README
ENCODING?= EUC-JP
-ICONV= ${LOCALBASE}/bin/iconv
MKTEXLSR= ${LOCALBASE}/bin/mktexlsr
.SILENT::
@@ -49,7 +47,7 @@ post-configure:
${SED} -e 's/\(sample\.tex\)/j\1/g' ${INSFILE:S/$/.orig/} \
> ${INSFILE} && \
${MV} ${DTXFILE} ${DTXFILE}.orig && \
- ${ICONV} -f ISO-2022-JP -t ${ENCODING} ${DTXFILE}.orig > ${DTXFILE} )
+ ${ICONV_CMD} -f ISO-2022-JP -t ${ENCODING} ${DTXFILE}.orig > ${DTXFILE} )
do-build:
( cd ${WRKSRC} && platex ${INSFILE} && \
diff --git a/sysutils/djmount/Makefile b/sysutils/djmount/Makefile
index ef86386..65089d7 100644
--- a/sysutils/djmount/Makefile
+++ b/sysutils/djmount/Makefile
@@ -11,11 +11,10 @@ MAINTAINER= eric@camachat.org
COMMENT= Mount UPnP A/V Media
LIB_DEPENDS= upnp.9:${PORTSDIR}/devel/upnp
-BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
PLIST_FILES= bin/${PORTNAME}
GNU_CONFIGURE= yes
-USES= fuse pkgconfig
+USES= fuse iconv:build pkgconfig
CONFIGURE_ARGS= --with-libiconv-prefix=${LOCALBASE} \
--with-fuse-prefix=${LOCALBASE} \
--with-external-libupnp --with-libupnp-prefix=${LOCALBASE}
diff --git a/ukrainian/hunspell/Makefile b/ukrainian/hunspell/Makefile
index 7fa73eb..f0a431f 100644
--- a/ukrainian/hunspell/Makefile
+++ b/ukrainian/hunspell/Makefile
@@ -12,9 +12,7 @@ DIST_SUBDIR= ${PORTNAME}
MAINTAINER= office@FreeBSD.org
COMMENT= Ukrainian hunspell dictionaries
-BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
-
-USES= shebangfix perl5
+USES= iconv:build shebangfix perl5
ALL_TARGET= myspell
USE_GMAKE= yes
USE_PERL5= build
OpenPOWER on IntegriCloud