diff options
author | bapt <bapt@FreeBSD.org> | 2013-05-05 16:10:29 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-05-05 16:10:29 +0800 |
commit | 52a8fdac71139b91e871909899732a523b7c1182 (patch) | |
tree | 15966d76d178ff21b844245038d7d36f470ebe1c /shells | |
parent | da644d746b21d80b4fb72e1a6e3173793aab4eab (diff) | |
download | freebsd-ports-graphics-52a8fdac71139b91e871909899732a523b7c1182.tar.gz freebsd-ports-graphics-52a8fdac71139b91e871909899732a523b7c1182.tar.zst freebsd-ports-graphics-52a8fdac71139b91e871909899732a523b7c1182.zip |
Convert to new options framework
This fixes build with nls not correctly pulling in libintl given USES= gettext was set after pre.mk which is forbidden
Diffstat (limited to 'shells')
-rw-r--r-- | shells/bash/Makefile | 43 | ||||
-rw-r--r-- | shells/bash/options | 7 |
2 files changed, 21 insertions, 29 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index 54dbc0952bf..a4f64c7de24 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -26,19 +26,21 @@ COMMENT= The GNU Project's Bourne Again SHell IGNOREFILES= FAQ -USES+= bison +OPTIONS_DEFINE= IMPLICITCD COLONBREAKSWORDS HELP NLS STATIC SYSLOG +OPTIONS_DEFAULT= IMPLICITCD COLONBREAKSWORDS HELP +IMPLICITCD_DESC= Use directory name alone to cd into it +COLONBREAKSWORDS_DESC= Colons break words +HELP_DESC= Install the help files -.if defined(WITH_OPTIONS) || defined(WITH_BASH_OPTIONS) -.include "${.CURDIR}/../bash/options" -.endif +USES+= bison -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if !defined(WITHOUT_IMPLICITCD) +.if ${PORT_OPTIONS:MIMPLICITCD} EXTRA_PATCHES+= ${PATCHDIR}/xpatch-implicitcd .endif -.if !defined(WITHOUT_COLONBREAKSWORDS) +.if ${PORT_OPTIONS:MCOLONBREAKSWORDS} EXTRA_PATCHES+= ${PATCHDIR}/xpatch-colonbreakswords .endif @@ -48,7 +50,7 @@ INFO= bash MAKE_JOBS_UNSAFE= yes GNU_CONFIGURE= yes -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} .if !defined(WITH_INCLUDED_FAQ) DISTFILES+= FAQ:faq .endif @@ -59,10 +61,7 @@ CONFIGURE_ARGS= --without-bash-malloc \ --disable-rpath \ --enable-disabled-builtins -.if defined(WITH_STATIC_BASH) || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ${NOSHARED:L} != "no") -.if !defined(WITHOUT_NLS) -WITHOUT_NLS=yes -.endif +.if ${PORT_OPTIONS:MSTATIC_BASH} || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ${NOSHARED:L} != "no") CONFIGURE_ARGS+= --enable-static-link PKGNAMESUFFIX= -static CONFLICTS+= bash-[0-9]* bash-devel-[0-9]* bash-static-devel-[0-9]* @@ -71,7 +70,7 @@ CONFIGURE_ARGS+= --enable-static-link=no CONFLICTS+= bash-static-[0-9]* bash-devel-[0-9]* bash-static-devel-[0-9]* .endif -.if defined(WITHOUT_HELP) +.if ! ${PORT_OPTIONS:MHELP} CONFIGURE_ARGS+= --disable-help-builtin PLIST_SUB+= HELP="@comment " .elif defined(WITH_INTEGRATED_HELPFILES) @@ -81,12 +80,12 @@ CONFIGURE_ARGS+= --enable-separate-helpfiles PLIST_SUB+= HELP="" .endif -.if defined(WITHOUT_NLS) -CONFIGURE_ARGS+= --disable-nls -PLIST_SUB+= NLS="@comment " -.else +.if ${PORT_OPTIONS:MNLS} USES+= gettext iconv PLIST_SUB+= NLS="" +.else +CONFIGURE_ARGS+= --disable-nls +PLIST_SUB+= NLS="@comment " .endif CPPFLAGS+= ${PTHREAD_CFLAGS} \ @@ -97,19 +96,19 @@ CONFIGURE_ENV= YACC="bison -y" post-patch: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/doc/bash.1 -.if defined(WITH_SYSLOG) +.if ${PORT_OPTIONS:MSYSLOG} @${REINPLACE_CMD} \ -e "s|/\*.*#define SYSLOG_HISTORY .*\*/|#define SYSLOG_HISTORY|g" \ ${WRKSRC}/config-top.h .endif -.if defined(WITHOUT_NLS) +.if ! ${PORT_OPTIONS:MNLS} @${REINPLACE_CMD} -e "s|@LIBICONV@||g" ${WRKSRC}/Makefile.in .endif post-configure: @${FIND} ${WRKSRC} -name Makefile -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e "s|^DESTDIR *=|& ${DESTDIR}|" -.if defined(WITHOUT_NLS) +.if ! ${PORT_OPTIONS:MNLS} @${REINPLACE_CMD} -e "s|#define HAVE_ICONV 1|#undef HAVE_ICONV|g" ${WRKSRC}/config.h .endif @@ -122,7 +121,7 @@ pre-install: post-install: @cd ${PREFIX}/bin ; ${LN} -sf bash rbash -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} .if !defined(WITH_INCLUDED_FAQ) @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/FAQ \ @@ -151,4 +150,4 @@ cklatest: ftp://ftp.cwru.edu/pub/${PORTNAME}/${PORTNAME}-${PORTVERSION:C/\.[0-9a-z]*$//}-patches/ \ | fgrep -v .sig | ${TAIL} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/shells/bash/options b/shells/bash/options deleted file mode 100644 index e470ed66b4c..00000000000 --- a/shells/bash/options +++ /dev/null @@ -1,7 +0,0 @@ -OPTIONS= IMPLICITCD "Use directory name alone to cd into it" on \ - COLONBREAKSWORDS "Colons break words" on \ - HELP "Install the help files" on \ - INST_READL "Use readline from base, otherwise bash's" on \ - NLS "National Language Support" on \ - STATIC_BASH "Compile without shared libs" off \ - SYSLOG "Compile with syslog support" off |