This is an automated email from the ASF dual-hosted git repository.

jim pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 05ab2ed  Move to using (requiring) EPM 5.0.0 or later for AOO
05ab2ed is described below

commit 05ab2edc19b6654f8d6db3fd825264a24e721202
Author: Jim Jagielski <[email protected]>
AuthorDate: Fri Nov 20 16:01:03 2020 -0500

    Move to using (requiring) EPM 5.0.0 or later for AOO
    
    (cherry picked from commit 6661e287d160b98618052ea914b7c66d3c46fa4e)
---
 main/configure.ac                            |  86 +---
 main/epm/epm-3.7.patch                       | 657 ---------------------------
 main/epm/makefile.mk                         |   5 +-
 main/set_soenv.in                            |   2 +-
 main/solenv/bin/make_installer.pl            |  10 +-
 main/solenv/bin/modules/installer/epmfile.pm |   5 +-
 6 files changed, 32 insertions(+), 733 deletions(-)

diff --git a/main/configure.ac b/main/configure.ac
index 6448afe..324cbaa 100644
--- a/main/configure.ac
+++ b/main/configure.ac
@@ -118,20 +118,18 @@ AC_ARG_WITH(afms,
                           are known to be available.
 ],,)
 AC_ARG_ENABLE(epm,
-[  --disable-epm           AOO includes self-packaging code, that requires
-                          epm, however epm is useless for large scale
-                          package building.
+[  --disable-epm           AOO includes self-packaging code, that requires EPM.
 ],,enable_epm="yes")
 AC_ARG_WITH(epm,
-[  --with-epm            Decides which epm to use. Default is to use
-                         the one from the system if one is built. When
+[  --with-epm            Decides which EPM to use. Default is to use
+                         the one installed on the system if one is there. When
                          either this is not there or you say =internal
-                         epm will be built.
+                         EPM will be built.
 ],,)
 AC_ARG_WITH(epm-url,
 [  --with-epm-url=<URL>    Specify the location of downloadable epm source 
code. For example:
-                            
https://sourceforge.net/projects/oooextras.mirror/files/epm-3.7.tar.gz
-                          Version 3.7 or later is required. Note that epm is 
under GPL license.
+                            https://github.com/jimjag/epm/archive/v5.0.0.tar.gz
+                          Version 5.0.0 or later is required.
 ],[  EPM_URL="$withval"
 ])
 AC_ARG_WITH(package-format,
@@ -3419,44 +3417,24 @@ if test "$enable_epm" = "yes"; then
          BUILD_TYPE="$BUILD_TYPE EPM"
       else
          if test "$EPM" = "no" ; then
-           AC_MSG_ERROR([no. Install ESP Package Manager 
(https://www.msweet.org/epm/) and/or specify the path to the right epm 
(--with-epm). Or specify an URL to an epm-3.7 source package (--with-epm-url); 
run configure with the --help option for a list of possible URLs.])
-        else
-           # Gentoo has some epm which is something different...
-            AC_MSG_CHECKING([whether the found epm is the right epm])
-            if $EPM | $GREP "ESP Package Manager" >/dev/null 2>/dev/null; then
+                AC_MSG_ERROR([no. Install ESP Package Manager (EPM) 
(https://jimjag.github.io/epm/) and/or specify the path to the right epm 
(--with-epm). Or specify an URL to an epm-5.0.0 (or later) source package 
(--with-epm-url); run configure with the --help option for a list of possible 
URLs.])
+             else
+                # Gentoo has some epm which is something different...
+            AC_MSG_CHECKING([whether the found EPM is the right EPM])
+            if $EPM --version | $GREP "ESP Package Manager" >/dev/null 
2>/dev/null; then
                AC_MSG_RESULT([yes])
             else
-              AC_MSG_ERROR([no. Install ESP Package Manager 
(https://www.msweet.org/epm/) and/or specify the path to the right epm 
(--with-epm). Or specify an URL to an epm-3.7 source package (--with-epm-url); 
run configure with the --help option for a list of possible URLs.])
+                   AC_MSG_ERROR([no. Install ESP Package Manager 
(https://jimjag.github.io/epm/) and/or specify the path to the right epm 
(--with-epm). Or specify an URL to an epm-5.0.0 (or later) source package 
(--with-epm-url); run configure with the --help option for a list of possible 
URLs.])
             fi
-            AC_MSG_CHECKING([epm version])
-            EPM_VERSION=`$EPM | $GREP 'ESP Package Manager' | cut -d' ' -f4 | 
$SED -e s/v//`
-           if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
-                   test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a 
"`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
-               AC_MSG_RESULT([OK, >= 3.7])
+            AC_MSG_CHECKING([EPM version])
+            EPM_VERSION=`$EPM --version | $GREP 'ESP Package Manager' | cut 
-d' ' -f5 | $SED -e s/v//`
+                if test "`echo $EPM_VERSION | cut -d'.' -f1`" -ge "5"; then
+               AC_MSG_RESULT([OK, >= 5.0])
                BUILD_EPM=NO
-              if test "$_os" = "Darwin"; then
-                 _osxpkgbuild='no'
-                 AC_MSG_CHECKING([checking if OS X pkgbuild is supported])
-                 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "4" || \
-                    test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "4" -a 
"`echo $EPM_VERSION | cut -d'.' -f2`" -ge "3"; then
-                   AC_MSG_RESULT([OK, >= 4.3])
-                   _osxpkgbuild='yes'
-              else
-                  AC_MSG_CHECKING([which PackageMaker EPM thinks to use])
-                     _pm=`strings $EPM | $GREP PackageMaker | cut -d" " -f1`
-                     if test "$_pm" = 
"/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
-                        AC_MSG_ERROR([$_pm; PackageMaker expected in wrong 
path. Either patch your epm with the right path 
(/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)])
-                     elif test "$_pm" = 
"/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker";
 then
-                        AC_MSG_RESULT([$_pm, ok])
-                     else # we never should get here, but go safe
-                            AC_MSG_ERROR([$_pm; PackageMaker expected in 
unknown path. Either patch your epm with the right path 
(/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker)])
-                         fi
-                     fi
-              fi
-           else
-               AC_MSG_ERROR([too old. epm >= 3.7 is required.])
-           fi
-        fi
+                else
+               AC_MSG_ERROR([too old. EPM >= 5.0.0 is required.])
+                fi
+       fi
       fi
    fi
 
@@ -3577,30 +3555,6 @@ msi - Windows .msi
          AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are 
not on OSX...])
        fi
    fi
-   if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
-      echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
-       if test "$EPM" != "no" && test "$EPM" != "internal"; then
-               AC_MSG_CHECKING([whether epm is patched for AOOs needs])
-               if $GREP "Patched for .*OpenOffice" $EPM >/dev/null 
2>/dev/null; then
-                  AC_MSG_RESULT([yes])
-               else
-                  AC_MSG_RESULT([no])
-                  if echo "$PKGFORMAT" | $GREP -q rpm; then
-                      _pt="rpm"
-                      AC_MSG_WARN([the rpms will need to be installed with 
--nodeps])
-                      echo "the rpms will need to be installed with --nodeps" 
>> warn
-                  else
-                      _pt="pkg"
-                  fi
-                  AC_MSG_WARN([the ${_pt}s will not be relocateable])
-                  echo "the ${_pt}s will not be relocatable" >> warn
-                  AC_MSG_WARN([if you want to make sure installation without 
--nodeps and
-                  relocation will work, you need to patch your epm with the
-                  patch in epm/epm-3.7.patch or build with
-                  --with-epm=internal which will build a suitable epm])
-               fi
-        fi
-   fi
    if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
       AC_PATH_PROG(PKGMK, pkgmk, no)
       if test "$PKGMK" = "no"; then
diff --git a/main/epm/epm-3.7.patch b/main/epm/epm-3.7.patch
deleted file mode 100644
index 02835bc..0000000
--- a/main/epm/epm-3.7.patch
+++ /dev/null
@@ -1,657 +0,0 @@
-diff -urN epm-3.7-old//bsd.c epm-3.7/bsd.c
---- misc/epm-3.7/bsd.c 2003-01-14 17:05:01.000000000 +0000
-+++ misc/build/epm-3.7/bsd.c   2010-04-19 22:52:32.000000000 +0000
-@@ -26,6 +26,13 @@
- 
- #include "epm.h"
- 
-+void cr2semicolon(char *command)
-+{
-+  int len, i;
-+  len=strlen(command);
-+  for (i=0;i<len;i++)
-+    if(*(command+i)=='\n') *(command+i)=';';
-+}
- 
- /*
-  * 'make_bsd()' - Make a FreeBSD software distribution package.
-@@ -149,8 +156,17 @@
- 
-   for (i = dist->num_depends, d = dist->depends; i > 0; i --, d ++)
-   {
-+#ifdef __FreeBSD__
-+    if (d->type == DEPEND_REQUIRES) {
-+      if (dist->relnumber)
-+        fprintf(fp, "@pkgdep %s-%s-%d-%s", d->product, dist->version, 
dist->relnumber, platname);
-+      else
-+        fprintf(fp, "@pkgdep %s-%s-%s", d->product, dist->version, platname);
-+    }
-+#else
-     if (d->type == DEPEND_REQUIRES)
-       fprintf(fp, "@pkgdep %s", d->product);
-+#endif
-     else
- #ifdef __FreeBSD__
-      /*
-@@ -179,9 +195,11 @@
-               "         by the BSD packager.\n", stderr);
-           break;
-       case COMMAND_POST_INSTALL :
-+      cr2semicolon(c->command);
-           fprintf(fp, "@exec %s\n", c->command);
-         break;
-       case COMMAND_PRE_REMOVE :
-+      cr2semicolon(c->command);
-           fprintf(fp, "@unexec %s\n", c->command);
-         break;
-       case COMMAND_POST_REMOVE :
-@@ -199,7 +217,7 @@
-       */
- 
-       fprintf(fp, "@exec /bin/mkdir -p %s\n", file->dst);
--      fprintf(fp, "@exec /bin/chown %s:%s %s\n", file->user, file->group,
-+      fprintf(fp, "@exec /usr/sbin/chown %s:%s %s\n", file->user, file->group,
-               file->dst);
-       fprintf(fp, "@exec /bin/chmod %04o %s\n", file->mode, file->dst);
-     }
-@@ -326,12 +344,13 @@
-   if (Verbosity)
-     puts("Building FreeBSD pkg binary distribution...");
- 
--  if (run_command(NULL, "pkg_create -p / -s %s -c %s -d %s -f %s %s",
-+  if (run_command(NULL, "/usr/sbin/pkg_create -p / -s %s -c %s -d %s -f %s 
%s",
-                   current, commentname, descrname, plistname, name))
-     return (1);
- 
--  if (run_command(NULL, "mv %s.tgz %s", name, directory))
--    return (1);
-+  if (run_command(NULL, "mv %s.tbz %s", name, directory))
-+    if (run_command(NULL, "mv %s.tgz %s", name, directory))
-+      return (1);
- 
-  /*
-   * Remove temporary files...
-diff -urN epm-3.7-old//configure epm-3.7/configure
---- misc/epm-3.7/configure     2003-07-24 01:20:54.000000000 +0000
-+++ misc/build/epm-3.7/configure       2010-04-19 22:52:32.000000000 +0000
-@@ -1238,6 +1238,11 @@
- fi
- fi;
- 
-+# Check whether --enable-fltk or --disable-fltk was given.
-+if test "${enable_fltk+set}" = set; then
-+  enableval="$enable_fltk"
-+fi;
-+
- 
- # Check whether --with-docdir or --without-docdir was given.
- if test "${with_docdir+set}" = set; then
-@@ -4904,36 +4909,38 @@
- fi
- 
- 
--# Extract the first word of "fltk-config", so it can be a program name with 
args.
--set dummy fltk-config; ac_word=$2
--echo "$as_me:$LINENO: checking for $ac_word" >&5
--echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
--if test "${ac_cv_path_FLTKCONFIG+set}" = set; then
--  echo $ECHO_N "(cached) $ECHO_C" >&6
--else
--  case $FLTKCONFIG in
--  [\\/]* | ?:[\\/]*)
--  ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # Let the user override the test with a 
path.
--  ;;
--  *)
--  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
--  IFS=$as_save_IFS
--  test -z "$as_dir" && as_dir=.
--  for ac_exec_ext in '' $ac_executable_extensions; do
--  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
--    ac_cv_path_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext"
--    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
--    break 2
-+if eval "test x$enable_fltk = xyes"; then
-+  # Extract the first word of "fltk-config", so it can be a program name with 
args.
-+  set dummy fltk-config; ac_word=$2
-+  echo "$as_me:$LINENO: checking for $ac_word" >&5
-+  echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+  if test "${ac_cv_path_FLTKCONFIG+set}" = set; then
-+    echo $ECHO_N "(cached) $ECHO_C" >&6
-+  else
-+    case $FLTKCONFIG in
-+    [\\/]* | ?:[\\/]*)
-+    ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # Let the user override the test with 
a path.
-+    ;;
-+    *)
-+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+  for as_dir in $PATH
-+  do
-+    IFS=$as_save_IFS
-+    test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+    if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+      ac_cv_path_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext"
-+      echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+      break 2
-+    fi
-+  done
-+  done
-+  
-+    ;;
-+  esac
-   fi
--done
--done
--
--  ;;
--esac
-+  FLTKCONFIG=$ac_cv_path_FLTKCONFIG
- fi
--FLTKCONFIG=$ac_cv_path_FLTKCONFIG
- 
- if test -n "$FLTKCONFIG"; then
-   echo "$as_me:$LINENO: result: $FLTKCONFIG" >&5
-@@ -4950,8 +4957,10 @@
-       INSTALL_GUIS=""
-       INSTALL_OSX=""
- 
-+if eval "test x$enable_fltk = xyes"; then
-       { echo "$as_me:$LINENO: WARNING: Sorry, setup GUI requires FLTK 1.1.x." 
>&5
- echo "$as_me: WARNING: Sorry, setup GUI requires FLTK 1.1.x." >&2;}
-+fi
- else
-       CXXFLAGS="`$FLTKCONFIG --cflags` ${CXXFLAGS}"
-       GUIS="setup uninst"
-diff -urN epm-3.7-old//deb.c epm-3.7/deb.c
---- misc/epm-3.7/deb.c 2003-01-15 14:29:24.000000000 +0000
-+++ misc/build/epm-3.7/deb.c   2010-04-19 22:53:34.000000000 +0000
-@@ -26,6 +26,28 @@
- 
- #include "epm.h"
- 
-+/*
-+ * 'add_size()' - Append Installed-Size tag to DEBIAN/control file
-+ */
-+ 
-+int                             /* O - 0 = success, 1 = fail */
-+add_size(FILE       *fpControl, /* Control file stream */
-+         const char *directory) /* Directory containing all files to package 
*/
-+{
-+    FILE *fp;
-+    char command[1024];
-+    
-+    snprintf(command, sizeof(command), "du -k -s %s", directory);
-+    fp = popen(command, "r");
-+    if( NULL != fp )
-+    {
-+        char size[1024];
-+        fscanf(fp, "%s .", size);
-+        fprintf(fpControl, "Installed-Size: %s\n", size);
-+        return pclose(fp);
-+    }
-+    return 1;
-+}
- 
- /*
-  * 'make_deb()' - Make a Debian software distribution package.
-@@ -61,18 +83,37 @@
-   if (Verbosity)
-     puts("Creating Debian distribution...");
- 
-+  /*
-+   * Use debian default naming scheme
-+   */
-+
-+  if (!strcmp(platform->machine, "intel"))
-+#ifdef __FreeBSD_kernel__
-+    platname = "kfreebsd-i386";
-+#else
-+    platname = "i386";
-+#endif
-+  else if (!strcmp(platform->machine, "x86_64"))
-+#ifdef __FreeBSD_kernel__
-+    platname = "kfreebsd-amd64";
-+#else
-+    platname = "amd64";
-+#endif
-+  else if (!strcmp(platform->machine, "ppc"))
-+    platname = "powerpc";
-+
-   if (dist->relnumber)
-   {
-     if (platname[0])
--      snprintf(name, sizeof(name), "%s-%s-%d-%s", prodname, dist->version, 
dist->relnumber,
-+      snprintf(name, sizeof(name), "%s_%s-%d_%s", prodname, dist->version, 
dist->relnumber,
-               platname);
-     else
--      snprintf(name, sizeof(name), "%s-%s-%d", prodname, dist->version, 
dist->relnumber);
-+      snprintf(name, sizeof(name), "%s_%s-%d", prodname, dist->version, 
dist->relnumber);
-   }
-   else if (platname[0])
--    snprintf(name, sizeof(name), "%s-%s-%s", prodname, dist->version, 
platname);
-+    snprintf(name, sizeof(name), "%s_%s_%s", prodname, dist->version, 
platname);
-   else
--    snprintf(name, sizeof(name), "%s-%s", prodname, dist->version);
-+    snprintf(name, sizeof(name), "%s_%s", prodname, dist->version);
- 
-  /*
-   * Write the control file for DPKG...
-@@ -108,8 +141,20 @@
-   * (which we change in get_platform to a common name)
-   */
- 
--  if (strcmp(platform->machine, "intel") == 0)
-+  if (!strcmp(platform->machine, "intel"))
-+#ifdef __FreeBSD_kernel__
-+    fputs("Architecture: kfreebsd-i386\n", fp);
-+#else
-     fputs("Architecture: i386\n", fp);
-+#endif
-+  else if (!strcmp(platform->machine, "x86_64"))
-+#ifdef __FreeBSD_kernel__
-+    fputs("Architecture: kfreebsd-amd64\n", fp);
-+#else
-+    fputs("Architecture: amd64\n", fp);
-+#endif
-+  else if (!strcmp(platform->machine, "ppc"))
-+    fputs("Architecture: powerpc\n", fp);
-   else
-     fprintf(fp, "Architecture: %s\n", platform->machine);
- 
-@@ -148,9 +193,9 @@
-       putc('\n', fp);
-     }
-   }
--
-+  
-   fclose(fp);
--
-+  
-  /*
-   * Write the preinst file for DPKG...
-   */
-@@ -417,6 +462,27 @@
-     }
-   }
- 
-+  
-+  /* 
-+   * Calculate and append Installed-Size to DEBIAN/control
-+   */
-+   
-+  if (Verbosity)
-+    puts("Calculating Installed-Size...");
-+  
-+  snprintf(filename, sizeof(filename), "%s/%s/DEBIAN/control", directory, 
name);
-+  if ((fp = fopen(filename, "a")) == NULL)
-+  {
-+    fprintf(stderr, "epm: Unable to Installed-Size to file \"%s\" - %s\n", 
filename,
-+            strerror(errno));
-+    return (1);
-+  }
-+
-+  snprintf(filename, sizeof(filename), "%s/%s", directory, name);  
-+  add_size(fp, filename);
-+  fclose(fp);
-+ 
-+
-  /*
-   * Build the distribution from the spec file...
-   */
-diff -urN epm-3.7-old//dist.c epm-3.7/dist.c
---- misc/epm-3.7/dist.c        2003-08-07 14:14:40.000000000 +0000
-+++ misc/build/epm-3.7/dist.c  2010-04-19 22:52:32.000000000 +0000
-@@ -394,8 +394,13 @@
-   strcpy(platform->machine, "mips");
- #elif defined(__hpux)
-   strcpy(platform->machine, "hppa");
--#elif defined(_AIX) || defined(__APPLE__)
-+#elif defined(_AIX)
-   strcpy(platform->machine, "powerpc");
-+#elif defined(__APPLE__)
-+  if (strstr(platform->machine, "86") != NULL)
-+    strcpy(platform->machine, "intel");
-+  else
-+    strcpy(platform->machine, "powerpc");  
- #else
-   for (temp = platform->machine; *temp != '\0'; temp ++)
-     if (*temp == '-' || *temp == '_')
-@@ -407,7 +412,12 @@
-       *temp = tolower(*temp);
- 
-   if (strstr(platform->machine, "86") != NULL)
--    strcpy(platform->machine, "intel");
-+  {
-+    if (strstr(platform->machine, "64") != NULL)
-+      strcpy(platform->machine, "x86_64");
-+    else
-+      strcpy(platform->machine, "intel");
-+  }
-   else if (strncmp(platform->machine, "sun", 3) == 0)
-     strcpy(platform->machine, "sparc");
- #endif /* __sgi */
-diff -urN epm-3.7-old//epm.c epm-3.7/epm.c
---- misc/epm-3.7/epm.c 2003-10-28 14:48:30.000000000 +0000
-+++ misc/build/epm-3.7/epm.c   2010-04-19 22:52:32.000000000 +0000
-@@ -547,6 +547,7 @@
- {
-   puts(EPM_VERSION);
-   puts("Copyright 1999-2003 by Easy Software Products.");
-+  puts("Patched for OpenOffice.org");
-   puts("");
-   puts("EPM is free software and comes with ABSOLUTELY NO WARRANTY; for 
details");
-   puts("see the GNU General Public License in the file COPYING or at");
-diff -urN epm-3.7-old//file.c epm-3.7/file.c
---- misc/epm-3.7/file.c        2003-07-23 21:41:08.000000000 +0000
-+++ misc/build/epm-3.7/file.c  2010-04-19 22:52:32.000000000 +0000
-@@ -108,7 +108,6 @@
-   fclose(dstfile);
- 
-   chmod(dst, mode);
--  chown(dst, owner, group);
- 
-   return (0);
- }
-@@ -138,7 +137,6 @@
-       {
-       mkdir(buffer, 0777);
-       chmod(buffer, mode | 0700);
--      chown(buffer, owner, group);
-       }
-     }
- 
-@@ -151,7 +149,6 @@
-   {
-     mkdir(buffer, 0777);
-     chmod(buffer, mode | 0700);
--    chown(buffer, owner, group);
-   }
- 
-   return (0);
-diff -urN epm-3.7-old//osx.c epm-3.7/osx.c
---- misc/epm-3.7/osx.c 2003-07-23 21:41:08.000000000 +0000
-+++ misc/build/epm-3.7/osx.c   2010-04-19 22:52:32.000000000 +0000
-@@ -373,7 +373,7 @@
-   else
-     snprintf(filename, sizeof(filename), "%s/%s", current, directory);
- 
--  run_command(NULL, "/Developer/Applications/PackageMaker.app/"
-+  run_command(NULL, "/Developer/Applications/Utilities/PackageMaker.app/"
-                     "Contents/MacOS/PackageMaker -build "
-                   "-p %s/%s.pkg -f %s/Package -r %s/Resources -d 
%s/%s-desc.plist -i %s/%s-info.plist",
-             filename, prodname, filename, filename, filename, prodname, 
filename, prodname);
-diff -urN epm-3.7-old//pkg.c epm-3.7/pkg.c
---- misc/epm-3.7/pkg.c 2002-12-17 18:57:56.000000000 +0000
-+++ misc/build/epm-3.7/pkg.c   2010-04-19 22:52:32.000000000 +0000
-@@ -429,75 +429,6 @@
- 
-   fclose(fp);
- 
-- /*
--  * Build the distribution from the prototype file...
--  */
--
--  if (Verbosity)
--    puts("Building PKG binary distribution...");
--
--  if (run_command(NULL, "pkgmk -o -f %s/%s.prototype -d %s/%s",
--                  directory, prodname, current, directory))
--    return (1);
--
-- /*
--  * Tar and compress the distribution...
--  */
--
--  if (Verbosity)
--    puts("Creating tar.gz file for distribution...");
--
--  snprintf(filename, sizeof(filename), "%s/%s.tar.gz", directory, name);
--
--  if ((tarfile = tar_open(filename, 1)) == NULL)
--    return (1);
--
--  snprintf(filename, sizeof(filename), "%s/%s", directory, prodname);
--
--  if (tar_directory(tarfile, filename, prodname))
--  {
--    tar_close(tarfile);
--    return (1);
--  }
--
--  tar_close(tarfile);
--
-- /*
--  * Make a package stream file...
--  */
--
--  if (Verbosity)
--    puts("Copying into package stream file...");
--
--  if (run_command(directory, "pkgtrans -s %s/%s %s.pkg %s",
--                  current, directory, name, prodname))
--    return (1);
--
-- /*
--  * Remove temporary files...
--  */
--
--  if (!KeepFiles)
--  {
--    if (Verbosity)
--      puts("Removing temporary distribution files...");
--
--    snprintf(filename, sizeof(filename), "%s/%s.pkginfo", directory, 
prodname);
--    unlink(filename);
--    snprintf(filename, sizeof(filename), "%s/%s.depend", directory, prodname);
--    unlink(filename);
--    snprintf(filename, sizeof(filename), "%s/%s.prototype", directory, 
prodname);
--    unlink(filename);
--    if (preinstall[0])
--      unlink(preinstall);
--    if (postinstall[0])
--      unlink(postinstall);
--    if (preremove[0])
--      unlink(preremove);
--    if (postremove[0])
--      unlink(postremove);
--  }
--
-   return (0);
- }
- 
-diff -urN epm-3.7-old//qprintf.c epm-3.7/qprintf.c
---- misc/epm-3.7-old/qprintf.c 2003-01-27 21:48:03.000000000 +0000
-+++ misc/build/epm-3.7/qprintf.c       2010-04-19 22:52:32.000000000 +0000
-@@ -181,12 +181,19 @@
- 
-             for (i = slen; i > 0; i --, s ++, bytes ++)
-           {
-+#if defined(__FreeBSD__)
-+            if (strchr("`~!#%^&*()[{]}\\|;\'\"<>? ", *s))
-+            {
-+              putc('\\', fp);
-+              bytes ++;
-+            }
-+#else
-             if (strchr("`~!#$%^&*()[{]}\\|;\'\"<>? ", *s))
-             {
-               putc('\\', fp);
-               bytes ++;
-             }
--
-+#endif
-             putc(*s, fp);
-           }
- 
-diff -urN epm-3.7-old//rpm.c epm-3.7/rpm.c
---- misc/epm-3.7/rpm.c 2003-10-01 19:27:15.000000000 +0000
-+++ misc/build/epm-3.7/rpm.c   2010-04-19 22:52:32.000000000 +0000
-@@ -38,7 +38,7 @@
-          dist_t         *dist,                /* I - Distribution information 
*/
-        struct utsname *platform)      /* I - Platform information */
- {
--  int         i;                      /* Looping var */
-+  int         i,n;                    /* Looping vars */
-   FILE                *fp;                    /* Spec file */
-   char                name[1024];             /* Full product name */
-   char                specname[1024];         /* Spec filename */
-@@ -160,6 +160,8 @@
-       fprintf(fp, "Requires: %s", dname);
-     else if (d->type == DEPEND_PROVIDES)
-       fprintf(fp, "Provides: %s", dname);
-+    else if (d->type == DEPEND_REPLACES)
-+      fprintf(fp, "Obsoletes: %s", dname);
-     else
-       fprintf(fp, "Conflicts: %s", dname);
- 
-@@ -186,15 +188,33 @@
-   for (i = 0; i < dist->num_descriptions; i ++)
-     fprintf(fp, "%s\n", dist->descriptions[i]);
- 
--  fputs("%pre\n", fp);
-+  /*
-+   * %pre
-+   */
-+  n = 0;
-   for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
-+  {
-     if (c->type == COMMAND_PRE_INSTALL)
-+    {
-+      if (1 == ++n)  /* Only write %pre if there is at least one command */
-+        fputs("%pre\n", fp);
-       fprintf(fp, "%s\n", c->command);
-+    }
-+  }
- 
--  fputs("%post\n", fp);
-+  /*
-+   * %post
-+   */
-+  n = 0;
-   for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
-+  {
-     if (c->type == COMMAND_POST_INSTALL)
-+    {
-+      if (1 == ++n)  /* Only write %post if there is at least one command */
-+        fputs("%post\n", fp);
-       fprintf(fp, "%s\n", c->command);
-+    }
-+  }
- 
-   for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
-     if (tolower(file->type) == 'i')
-@@ -202,6 +222,8 @@
- 
-   if (i)
-   {
-+    if (1 == ++n)  /* If not previously done so, write %post here */
-+      fputs("%post\n", fp);
-     fputs("if test \"x$1\" = x1; then\n", fp);
-     fputs("   echo Setting up init scripts...\n", fp);
- 
-@@ -259,13 +281,17 @@
-     fputs("fi\n", fp);
-   }
- 
--  fputs("%preun\n", fp);
-+  /*
-+   * %preun
-+   */
-+  n = 0;
-   for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
-     if (tolower(file->type) == 'i')
-       break;
- 
-   if (i)
-   {
-+    fputs("%preun\n", fp); ++n; /* Need to write %preun here */
-     fputs("if test \"x$1\" = x0; then\n", fp);
-     fputs("   echo Cleaning up init scripts...\n", fp);
- 
-@@ -315,13 +341,29 @@
-   }
- 
-   for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
-+  {
-     if (c->type == COMMAND_PRE_REMOVE)
-+    {
-+      if (1 == ++n)  /* Only write %preun if not previously done so */
-+        fputs("%preun\n", fp);
-+          
-       fprintf(fp, "%s\n", c->command);
-+    }
-+  }
- 
--  fputs("%postun\n", fp);
-+  /*
-+   * %post
-+   */
-+  n = 0;
-   for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
-+  {
-     if (c->type == COMMAND_POST_REMOVE)
-+    {
-+      if (1 == ++n)  /* Only write %post if there is at least one command */
-+        fputs("%postun\n", fp);
-       fprintf(fp, "%s\n", c->command);
-+    }
-+  }
- 
-   fputs("%files\n", fp);
-   for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
-@@ -415,53 +457,6 @@
-     }
-   }
- 
-- /*
--  * Build the distribution from the spec file...
--  */
--
--  if (Verbosity)
--    puts("Building RPM binary distribution...");
--
--  if (strcmp(platform->machine, "intel") == 0)
--  {
--    if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "i386 %s",
--                    Verbosity == 0 ? "--quiet" : "", specname))
--      return (1);
--  }
--  else if (run_command(NULL, EPM_RPMBUILD " %s -bb " EPM_RPMARCH "%s %s",
--                       Verbosity == 0 ? "--quiet" : "", platform->machine,
--                     specname))
--    return (1);
--
-- /*
--  * Move the RPM to the local directory and rename the RPM using the
--  * product name specified by the user...
--  */
--
--  if (strcmp(platform->machine, "intel") == 0)
--    run_command(NULL, "/bin/mv %s/RPMS/i386/%s-%s-%d.i386.rpm %s/%s.rpm",
--              rpmdir, prodname, dist->version, dist->relnumber,
--              directory, name);
--  else
--    run_command(NULL, "/bin/mv %s/RPMS/%s/%s-%s-%d.%s.rpm %s/%s.rpm",
--              rpmdir, platform->machine, prodname, dist->version,
--              dist->relnumber, platform->machine, directory, name);
--
-- /*
--  * Remove temporary files...
--  */
--
--  if (!KeepFiles)
--  {
--    if (Verbosity)
--      puts("Removing temporary distribution files...");
--
--    run_command(NULL, "/bin/rm -rf %s/RPMS", directory);
--    run_command(NULL, "/bin/rm -rf %s/buildroot", directory);
--
--    unlink(specname);
--  }
--
-   return (0);
- }
- 
diff --git a/main/epm/makefile.mk b/main/epm/makefile.mk
index ebe23c5..cbe6b3d 100644
--- a/main/epm/makefile.mk
+++ b/main/epm/makefile.mk
@@ -41,9 +41,8 @@ TARGET=epm
 
 .IF "$(GUI)"=="UNX"
 
-TARFILE_NAME=epm-3.7
-TARFILE_MD5=3ade8cfe7e59ca8e65052644fed9fca4
-PATCH_FILES=epm-3.7.patch
+TARFILE_NAME=v5.0.0
+TARFILE_MD5=8ce02a315807bd406b5de85ccf63e7fb
 
 CONFIGURE_ACTION=.$/configure
 CONFIGURE_FLAGS=--disable-fltk
diff --git a/main/set_soenv.in b/main/set_soenv.in
index 5f75d3c..1ee19a0 100644
--- a/main/set_soenv.in
+++ b/main/set_soenv.in
@@ -154,7 +154,7 @@ else
 $FLIPCMD        = "";               # Flip '/' to '\' wrapper (only for winnt)
 $GLIBC          = "";               # Whether the platform uses glibc
 $PROEXT         = "@PROEXT@";
-$EPM_FLAGS     = "";
+$EPM_FLAGS     = "--aoo-mode";
 
 # Required for OS/2 macro expansion
 my @unixroot='@unixroot';
diff --git a/main/solenv/bin/make_installer.pl 
b/main/solenv/bin/make_installer.pl
index 4600453..b2f1d99 100644
--- a/main/solenv/bin/make_installer.pl
+++ b/main/solenv/bin/make_installer.pl
@@ -1086,7 +1086,7 @@ sub MakeNonWindowsBuild ($$$$$$$$$$$$$$$)
                     {
                         # ... now epm can be started, to create the 
installation sets
 
-                        $installer::logger::Info->print( "... starting patched 
epm ... \n" );
+                        $installer::logger::Info->print( "... starting AOO 
compatible EPM ... \n" );
 
                         installer::epmfile::call_epm($epmexecutable, 
$completeepmfilename, $packagename, $includepatharrayref);
 
@@ -1119,11 +1119,11 @@ sub MakeNonWindowsBuild ($$$$$$$$$$$$$$$)
                         # ... now epm can be started, to create the 
installation sets
                         if ( $installer::globals::is_special_epm )
                         {
-                            $installer::logger::Info->print( "... starting 
patched epm ... \n" );
+                            $installer::logger::Info->print( "... starting AOO 
compatible EPM ... \n" );
                         }
                         else
                         {
-                            $installer::logger::Info->print( "... starting 
unpatched epm ... \n" );
+                            $installer::logger::Info->print( "... starting 
unpatched EPM ... \n" );
                         }
 
                         if ( $installer::globals::call_epm ) { 
installer::epmfile::call_epm($epmexecutable, $completeepmfilename, 
$packagename, $includepatharrayref); }
@@ -1174,7 +1174,7 @@ sub MakeNonWindowsBuild ($$$$$$$$$$$$$$$)
 
     if ( $installer::globals::postprocess_specialepm )
     {
-        installer::logger::include_header_into_logfile("Post EPM processes 
(Patched EPM):");
+        installer::logger::include_header_into_logfile("Post EPM processes 
(AOO Compatible EPM):");
 
         chdir($installdir);
 
@@ -1212,7 +1212,7 @@ sub MakeNonWindowsBuild ($$$$$$$$$$$$$$$)
 
     if ( $installer::globals::postprocess_standardepm )
     {
-        installer::logger::include_header_into_logfile("Post EPM processes 
(Standard EPM):");
+        installer::logger::include_header_into_logfile("Post EPM processes 
(Unpatched EPM):");
 
         chdir($installdir);
         
diff --git a/main/solenv/bin/modules/installer/epmfile.pm 
b/main/solenv/bin/modules/installer/epmfile.pm
index cfbc453..6da14dd 100644
--- a/main/solenv/bin/modules/installer/epmfile.pm
+++ b/main/solenv/bin/modules/installer/epmfile.pm
@@ -832,6 +832,7 @@ sub find_epm_on_system
 #################################################
 # Determining the epm patch state
 # saved in $installer::globals::is_special_epm
+# NOTE: W/ EPM 5.0.0 and later, it is ALWAYS special
 #################################################
 
 sub set_patch_state
@@ -846,7 +847,8 @@ sub set_patch_state
        while (<EPMPATCH>)
        {
                chop;
-               if ( $_ =~ /Patched for .*OpenOffice/ ) { 
$installer::globals::is_special_epm = 1; }
+               if ( $_ =~ /Patched for .*OpenOffice/ ) { 
$installer::globals::is_special_epm = 1; break; }
+               if ( $_ =~ /Apache OpenOffice compatible/ ) { 
$installer::globals::is_special_epm = 1; break; }
        }
                        
        close (EPMPATCH);
@@ -925,6 +927,7 @@ sub call_epm
        if ( $installer::globals::epmoutpath ne "" ) { $outdirstring = " 
--output-dir $installer::globals::epmoutpath"; }
        
        # Debian package build needs fakeroot or our LD_PRELOAD hack for 
correct rights
+       # NOTE: EPM 5.0.0 or later also uses fakeroot w/ dpkg if available
        
        my $ldpreloadstring = "";
        

Reply via email to