1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/ftp/wget/Makefile
Baptiste Daroussin e7b0f97788 Fix a long standing bug of lib/charset.alias being overwritten, modified, and badly tracked by ports.
Make lib/charset.alias a file only provided by converters/libiconv
Create a new USES: charsetfix, that will modify in post patch the Makefile.in to prevent a port from modifying/overwritting the charset.alias file during make install.
Prevent devel/gettext from installing that files.
Fix a couple of ports that actually touch charset.alias during the build phase.

Based on a patch by ale (http://lists.freebsd.org/pipermail/freebsd-gnome/2012-October/027747.html)

Approved by:	kwm (gnome)
Exp-run by:	miwi
2013-03-18 11:40:04 +00:00

81 lines
1.9 KiB
Makefile

# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$
PORTNAME= wget
DISTVERSION= 1.14
CATEGORIES= ftp www ipv6
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= wget
MAINTAINER= vd@FreeBSD.org
COMMENT= Retrieve files from the Net via HTTP(S) and FTP
USES= charsetfix
USE_XZ= yes
USE_GMAKE= yes
USE_PERL5_BUILD=yes
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
OPTIONS= GNUTLS "Support for SSL via GnuTLS" Off \
IPV6 "Support for IPv6" On \
NLS "Native Language Support with gettext" On \
OPENSSL "Support for SSL via OpenSSL" On \
IDN "Support IDN (Internationalized Domain Names)" On
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_OPENSSL)
.if !defined(WITHOUT_GNUTLS)
IGNORE= GNUTLS and OPENSSL are mutually exclusive, enable at most one of them
.endif
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+=--with-ssl=openssl
CPPFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.elif !defined(WITHOUT_GNUTLS)
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=--with-ssl=gnutls
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.else
CONFIGURE_ARGS+=--without-ssl
.endif
.if !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+=--enable-ipv6
.else
CONFIGURE_ARGS+=--disable-ipv6
.endif
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
CONFIGURE_ARGS+=--enable-nls
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB= NLS="@comment "
.endif
.if !defined(WITHOUT_IDN)
LIB_DEPENDS+= idn:${PORTSDIR}/dns/libidn
CONFIGURE_ARGS+=--enable-iri --with-libidn=${LOCALBASE}
.else
CONFIGURE_ARGS+=--disable-iri
.endif
MAN1= wget.1
INFO= wget
# eliminate gmakism
post-patch:
${REINPLACE_CMD} -e 's,$$<,$$(srcdir)/wget.texi,' \
${WRKSRC}/doc/Makefile.in
${REINPLACE_CMD} -e 's,/usr/local/etc/wgetrc,${PREFIX}/etc/wgetrc,' \
-e 's,@file{},@file{${PREFIX}},' \
${WRKSRC}/doc/sample.wgetrc* ${WRKSRC}/doc/wget.texi
.include <bsd.port.post.mk>