diff options
author | tijl <tijl@FreeBSD.org> | 2017-01-18 21:20:31 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2017-01-18 21:20:31 +0800 |
commit | d7b51d6e3b9874fae397ddfa8717c3be71d84edb (patch) | |
tree | 62d2805fd9c9c4285034b54a2ccb3f498f302811 /java | |
parent | 2739bac9ff93a8cdeb834d5da5f0c2720bad7903 (diff) | |
download | freebsd-ports-gnome-d7b51d6e3b9874fae397ddfa8717c3be71d84edb.tar.gz freebsd-ports-gnome-d7b51d6e3b9874fae397ddfa8717c3be71d84edb.tar.zst freebsd-ports-gnome-d7b51d6e3b9874fae397ddfa8717c3be71d84edb.zip |
The output of tools like awk, date, sort, tr,... depends on the current
locale set by the user. Add LANG=C and LC_ALL=C at the beginning of
bsd.port.mk and export them so all commands are executed with the C locale.
LC_ALL=C overrides all other LC_* variables. LANG is used by setlocale(3)
as default value for LC_* variables, so normally it isn't used when LC_ALL
is set, but there's code out there that looks at LANG directly so it's safer
to set it as well. The only commands not captured by this are !=
assignments before any inclusion of bsd.port.*mk.
Introduce USE_LOCALE=<locale> that adds LANG=<locale> and LC_ALL=<locale> to
CONFIGURE_ENV and MAKE_ENV so upstream build systems can be executed with a
different locale (e.g. USE_LOCALE=en_US.UTF-8).
PR: 215882
Exp-run by: antoine
Approved by: portmgr (antoine)
Diffstat (limited to 'java')
-rw-r--r-- | java/bootstrap-openjdk/Makefile.update | 4 | ||||
-rw-r--r-- | java/icedtea-web/Makefile | 4 | ||||
-rw-r--r-- | java/jakarta-commons-httpclient/Makefile | 2 | ||||
-rw-r--r-- | java/jfreechart/Makefile | 2 | ||||
-rw-r--r-- | java/openjdk6/Makefile | 2 | ||||
-rw-r--r-- | java/openjdk7/Makefile | 4 | ||||
-rw-r--r-- | java/openjdk8/Makefile | 3 |
7 files changed, 7 insertions, 14 deletions
diff --git a/java/bootstrap-openjdk/Makefile.update b/java/bootstrap-openjdk/Makefile.update index c3da35f51d7e..1f32b53f32eb 100644 --- a/java/bootstrap-openjdk/Makefile.update +++ b/java/bootstrap-openjdk/Makefile.update @@ -68,7 +68,7 @@ all: .endif @${ECHO} "Building ${DISTFILE}...." @${ECHO} "" - @${ECHO} "Started at "`${SETENV} LANG=C date -u`"." + @${ECHO} "Started at "`date -u`"." @${ECHO} "" @${ECHO} "==============================================================" @${ECHO} "" @@ -97,7 +97,7 @@ all: @${ECHO} "" @${ECHO} "${DISTFILE} was built successfully!" @${ECHO} "" - @${ECHO} "Finished at "`${SETENV} LANG=C date -u`"." + @${ECHO} "Finished at "`date -u`"." @${ECHO} "" @${ECHO} "You may clean up the build directory if everything looks okay," @${ECHO} "e.g., 'rm -fr ${FT2_PORTDIR}/work ${JDK_PORTDIR}/work'." diff --git a/java/icedtea-web/Makefile b/java/icedtea-web/Makefile index d1bccbbb23e2..12f744a9b25b 100644 --- a/java/icedtea-web/Makefile +++ b/java/icedtea-web/Makefile @@ -29,10 +29,6 @@ SHEBANG_FILES= jrunscript.in launcher/launchers.in WANT_GNOME= yes -EXTRACT_CMD= ${GZIP_CMD} -EXTRACT_BEFORE_ARGS= -dc -EXTRACT_AFTER_ARGS= | ${SETENV} LC_ALL=en_US.UTF-8 ${TAR} -xf - - CONFIGURE_ARGS= --with-hamcrest="${HAMCREST_JAR}" CONFIGURE_ARGS+= --with-jdk-home="${JAVA_HOME}" CONFIGURE_ARGS+= --with-jre-home="${JAVA_HOME}/jre" diff --git a/java/jakarta-commons-httpclient/Makefile b/java/jakarta-commons-httpclient/Makefile index b8ed172b2d42..9d0a38b74fa2 100644 --- a/java/jakarta-commons-httpclient/Makefile +++ b/java/jakarta-commons-httpclient/Makefile @@ -37,7 +37,7 @@ PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar PORTDOCS= * post-patch: - @LANG=C ${REINPLACE_CMD} 's/Ortwin Gl.*ck/Ortwin Glueck/' \ + @${REINPLACE_CMD} 's/Ortwin Gl.*ck/Ortwin Glueck/' \ ${WRKSRC}/src/java/org/apache/commons/httpclient/*.java \ ${WRKSRC}/src/java/org/apache/commons/httpclient/*/*.java diff --git a/java/jfreechart/Makefile b/java/jfreechart/Makefile index a7b3d5feed60..f3d6161748d1 100644 --- a/java/jfreechart/Makefile +++ b/java/jfreechart/Makefile @@ -24,9 +24,9 @@ COMPILE_DESC= Build from source .if ${PORT_OPTIONS:MCOMPILE} USE_ANT= yes +USE_LOCALE= en_US.UTF-8 ALL_TARGET= compile BUILD_WRKSRC= ${WRKSRC}/ant -MAKE_ENV= LANG=en_US.UTF-8 .else NO_BUILD= yes .endif diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile index dcfe195412dd..adc9ad47ebcf 100644 --- a/java/openjdk6/Makefile +++ b/java/openjdk6/Makefile @@ -98,7 +98,7 @@ BOOTSTRAPJDKDIR?= ${LOCALBASE}/bootstrap-openjdk BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:java/bootstrap-openjdk .endif -MAKE_ENV= LANG=C LC_ALL=C OS= \ +MAKE_ENV= OS= \ ALT_JDK_IMPORT_PATH=${BOOTSTRAPJDKDIR} \ ALT_BOOTDIR=${BOOTSTRAPJDKDIR} \ ALT_CACERTS_FILE=${FILESDIR}/cacerts \ diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile index ae872be3cd98..4052ca4ab8b5 100644 --- a/java/openjdk7/Makefile +++ b/java/openjdk7/Makefile @@ -104,9 +104,7 @@ NOPRECIOUSMAKEVARS= yes ONLY_FOR_ARCHS= i386 amd64 _MAKE_JOBS= # -MAKE_ENV+= LANG="C" \ - LC_ALL="C" \ - JAVA_HOME="" \ +MAKE_ENV+= JAVA_HOME="" \ CLASSPATH="" \ LD_LIBRARY_PATH="" \ MAKEFLAGS="" \ diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile index d4fae8dfa93a..ff5ae60e67f9 100644 --- a/java/openjdk8/Makefile +++ b/java/openjdk8/Makefile @@ -197,8 +197,7 @@ SHEBANG_FILES= configure _MAKE_JOBS= # CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -MAKE_ENV= LANG="C" LC_ALL="C" -MAKE_ENV+= CLASSPATH="" JAVA_HOME="" LD_LIBRARY_PATH="" +MAKE_ENV= CLASSPATH="" JAVA_HOME="" LD_LIBRARY_PATH="" MAKE_ENV+= IGNORE_OLD_CONFIG=true MAKE_ENV+= COMPILER_WARNINGS_FATAL="false" # openjdk8 normally sets X_CFLAGS in the ./configure script, but it won't do |