Skip to contentSkip to conversation

gettext: make gettext independant of host java components

PATCH In review Zhixiong Chi 2 participants 3 messages May 10, 2018 – May 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gettext: make gettext independant of host java components

The checksums of gettext were changing based on whether or not java and javac were installed. This patch makes gettext recipes independant of Java components.

---
 .../gettext-disable-javacomp-setting.patch         | 104 +++++++++++++++++++++
 meta/recipes-core/gettext/gettext_0.19.8.1.bb      |   1 +
 2 files changed, 105 insertions(+)
 create mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch
meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch new file +104 -0
new file mode 100644
index 0000000000..44ef3976f4
@@ -0,0 +1,104 @@
+The checksums of gettext were changing based on whether or not 
+java and javac were installed on the host.
+Since '--disable-java' and '--disable-native-java' are included
+in the EXTRA_OECONF, so it should not update and use the java env
+information, even though the java and javac exist on the host.
+This patch add reset operation for the env variable in m4 file to
+avoid the issue.
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-ff-by: Zhixiong Chi <[email protected]>
+
+Index: gettext-0.19.8.1/gettext-runtime/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/configure.ac
++++ gettext-0.19.8.1/gettext-runtime/configure.ac
+@@ -35,7 +35,7 @@ AC_PROG_YACC
+ 
+ gt_JAVA_CHOICE
+ 
+-gt_JAVACOMP([1.3], [1.1])
++gt_JAVACOMP([1.3], [1.1], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/configure.ac
++++ gettext-0.19.8.1/gettext-tools/configure.ac
+@@ -44,7 +44,7 @@ fi
+ AC_SUBST([BUILDJAVAEXE])
+ 
+ gt_JAVAEXEC
+-gt_JAVACOMP([1.3])
++gt_JAVACOMP([1.3], [], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javaexec.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+@@ -87,6 +87,17 @@ AC_DEFUN([gt_JAVAEXEC],
+       CLASSPATH="$save_CLASSPATH"
+     ])
+   fi
++  if test -z "$4"; then
++    HAVE_JAVAEXEC=
++    CONF_JAVA=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=
++    HAVE_JAVA_ENVVAR=
++    HAVE_GIJ=
++    HAVE_JAVA=
++    HAVE_JRE=
++    HAVE_JVIEW=
++  fi
+   if test -n "$HAVE_JAVAEXEC"; then
+     ac_result="$CONF_JAVA"
+   else
meta/recipes-core/gettext/gettext_0.19.8.1.bb +1 -0
index 68f5cc329a..490e291f8f 100644
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
 	   file://add-with-bisonlocaledir.patch \
 	   file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
 	   file://use-pkgconfig.patch \
+	   file://gettext-disable-javacomp-setting.patch \
 "
 
 SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
Signature · 1 line
2.11.0
#1 lore raw

I'm *really* uncomfortable patching gnulib in gettext, as we'll be carrying that patch for ever and no doubt having to copy/paste it for every other upstream that uses gnulib.

Would it be possible to just pass JAVAC=/bin/false to configure instead?

Ross

Quoted 141 lines · Zhixiong Chi

The checksums of gettext were changing based on whether or not java and javac were installed. This patch makes gettext recipes independant of Java components.

---
 .../gettext-disable-javacomp-setting.patch         | 104 +++++++++++++++++++++
 meta/recipes-core/gettext/gettext_0.19.8.1.bb      |   1 +
 2 files changed, 105 insertions(+)
 create mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch
meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch new file +104 -0
new file mode 100644
index 0000000000..44ef3976f4
@@ -0,0 +1,104 @@
+The checksums of gettext were changing based on whether or not
+java and javac were installed on the host.
+Since '--disable-java' and '--disable-native-java' are included
+in the EXTRA_OECONF, so it should not update and use the java env
+information, even though the java and javac exist on the host.
+This patch add reset operation for the env variable in m4 file to
+avoid the issue.
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-ff-by: Zhixiong Chi <[email protected]>
+
+Index: gettext-0.19.8.1/gettext-runtime/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/configure.ac
++++ gettext-0.19.8.1/gettext-runtime/configure.ac
+@@ -35,7 +35,7 @@ AC_PROG_YACC
+
+ gt_JAVA_CHOICE
+
+-gt_JAVACOMP([1.3], [1.1])
++gt_JAVACOMP([1.3], [1.1], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/configure.ac
++++ gettext-0.19.8.1/gettext-tools/configure.ac
+@@ -44,7 +44,7 @@ fi
+ AC_SUBST([BUILDJAVAEXE])
+
+ gt_JAVAEXEC
+-gt_JAVACOMP([1.3])
++gt_JAVACOMP([1.3], [], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javaexec.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+@@ -87,6 +87,17 @@ AC_DEFUN([gt_JAVAEXEC],
+       CLASSPATH="$save_CLASSPATH"
+     ])
+   fi
++  if test -z "$4"; then
++    HAVE_JAVAEXEC=
++    CONF_JAVA=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=
++    HAVE_JAVA_ENVVAR=
++    HAVE_GIJ=
++    HAVE_JAVA=
++    HAVE_JRE=
++    HAVE_JVIEW=
++  fi
+   if test -n "$HAVE_JAVAEXEC"; then
+     ac_result="$CONF_JAVA"
+   else
meta/recipes-core/gettext/gettext_0.19.8.1.bb +1 -1
index 68f5cc329a..490e291f8f 100644
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
           file://add-with-bisonlocaledir.patch \
           file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
           file://use-pkgconfig.patch \
+          file://gettext-disable-javacomp-setting.patch \
 "
 
 SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
--

2.11.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 5 lines · Ross

I'm *really* uncomfortable patching gnulib in gettext, as we'll be carrying that patch for ever and no doubt having to copy/paste it for every other upstream that uses gnulib.

Would it be possible to just pass JAVAC=/bin/false to configure instead?

It seems that even though we pass JAVAC=xxx to configure, it still is possible to be overrided by the m4 file in gnulib-m4/javacomp.m4 while compiling.

Thanks.

Quoted 145 lines

Ross

Quoted 141 lines · Zhixiong Chi

The checksums of gettext were changing based on whether or not java and javac were installed. This patch makes gettext recipes independant of Java components.

---
  .../gettext-disable-javacomp-setting.patch         | 104 +++++++++++++++++++++
  meta/recipes-core/gettext/gettext_0.19.8.1.bb      |   1 +
  2 files changed, 105 insertions(+)

create mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch

meta/recipes-core/gettext/gettext-0.19.8.1/gettext-disable-javacomp-setting.patch new file +104 -0
new file mode 100644
index 0000000000..44ef3976f4
@@ -0,0 +1,104 @@
+The checksums of gettext were changing based on whether or not
+java and javac were installed on the host.
+Since '--disable-java' and '--disable-native-java' are included
+in the EXTRA_OECONF, so it should not update and use the java env
+information, even though the java and javac exist on the host.
+This patch add reset operation for the env variable in m4 file to
+avoid the issue.
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-ff-by: Zhixiong Chi <[email protected]>
+
+Index: gettext-0.19.8.1/gettext-runtime/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/configure.ac
++++ gettext-0.19.8.1/gettext-runtime/configure.ac
+@@ -35,7 +35,7 @@ AC_PROG_YACC
+
+ gt_JAVA_CHOICE
+
+-gt_JAVACOMP([1.3], [1.1])
++gt_JAVACOMP([1.3], [1.1], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-runtime/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/configure.ac
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/configure.ac
++++ gettext-0.19.8.1/gettext-tools/configure.ac
+@@ -44,7 +44,7 @@ fi
+ AC_SUBST([BUILDJAVAEXE])
+
+ gt_JAVAEXEC
+-gt_JAVACOMP([1.3])
++gt_JAVACOMP([1.3], [], [1])
+ AC_CHECK_PROG([JAR], [jar], [jar])
+ if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
+   BUILDJAVA=yes
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javacomp.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javacomp.m4
+@@ -621,6 +621,17 @@ changequote([,])dnl
+     fi
+   fi
+   rm -f conftest*.java conftest*.class
++  reset_env_variable=$3
++  if test -n "$reset_env_variable"; then
++    CONF_JAVAC=
++    HAVE_JAVAC_ENVVAR=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=:
++    HAVE_GCJ_C=
++    HAVE_JAVAC=
++    HAVE_JIKES=
++    HAVE_JAVACOMP=
++  fi
+   if test -n "$HAVE_JAVACOMP"; then
+     ac_result="$CONF_JAVAC"
+   else
+Index: gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/gnulib-m4/javaexec.m4
++++ gettext-0.19.8.1/gettext-tools/gnulib-m4/javaexec.m4
+@@ -87,6 +87,17 @@ AC_DEFUN([gt_JAVAEXEC],
+       CLASSPATH="$save_CLASSPATH"
+     ])
+   fi
++  if test -z "$4"; then
++    HAVE_JAVAEXEC=
++    CONF_JAVA=
++    CLASSPATH=
++    CLASSPATH_SEPARATOR=
++    HAVE_JAVA_ENVVAR=
++    HAVE_GIJ=
++    HAVE_JAVA=
++    HAVE_JRE=
++    HAVE_JVIEW=
++  fi
+   if test -n "$HAVE_JAVAEXEC"; then
+     ac_result="$CONF_JAVA"
+   else
meta/recipes-core/gettext/gettext_0.19.8.1.bb +1 -1
index 68f5cc329a..490e291f8f 100644
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
            file://add-with-bisonlocaledir.patch \
            file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
            file://use-pkgconfig.patch \
+          file://gettext-disable-javacomp-setting.patch \
  "
 
  SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
--

2.11.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 4 lines
---------------------
Thanks,
Zhixiong Chi
Tel: +86-10-8477-7036