Hi, I'm trying to build enigmail-1.8.2 on OS/2. The problems are that OS/2 only
supports 8.3 naming with DLLs and needs a def file.
With this patch (ignore the changes to configure) the build dies here.
...
make[1]: Leaving directory `K:/usr/local/src/enigmail-1.8.2/lang'
./util/genxpi enigmail-1.8-os2-x86-gcc3.xpi 1.8 OS2 x86-gcc3 ./build/dist .
enigmail .dll yes
genxpi: Generating enigmail-1.8-os2-x86-gcc3.xpi in ./build/dist
Creating enigmail-1.8-os2-x86-gcc3.xpi file
zip warning: name not matched: subproc.dll
zip I/O error: No such file or directory
zip error: File not found or no read permission (subproc.dll)
make: *** [xpi] Error 18
...
>From 918f990fc70873b98ec9e0271ea30251869840d1 Mon Sep 17 00:00:00 2001
From: Dave Yeo
Date: Sun, 4 Oct 2015 21:58:44 -0700
Subject: [PATCH] Compile on OS/2
OS/2 needs a def file and 8.3 naming to produce a working DLL
---
config/getOsTarget.pl | 3 +++
configure | 64 +-
ipc/src/Makefile | 12 +-
ipc/src/subprocess.def | 8 +++
util/genxpi| 6 +
5 files changed, 86 insertions(+), 7 deletions(-)
create mode 100644 ipc/src/subprocess.def
diff --git a/config/getOsTarget.pl b/config/getOsTarget.pl
index d6205e9..9dfc717 100755
--- a/config/getOsTarget.pl
+++ b/config/getOsTarget.pl
@@ -138,6 +138,9 @@ elsif ($targetOs eq "Darwin") {
$dllPrefix = "lib";
$dllSuffix = ".dylib";
}
+elsif ($targetOs eq "OS2") {
+ $dllSuffix = ".dll";
+}
else {
$dllPrefix = "lib";
$dllSuffix = ".so";
diff --git a/configure b/configure
index d459eae..0cb4de6 100755
--- a/configure
+++ b/configure
@@ -74,8 +74,8 @@ fi
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ (PATH='/bin;/bin;/@unixroot/usr/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1
&& {
+(PATH='/bin:/bin:/@unixroot/usr/bin'; FPATH=$PATH; sh -c :) >/dev/null
2>&1 ||
PATH_SEPARATOR=';'
}
fi
@@ -1109,7 +1109,7 @@ do
esac
# Be sure to have absolute directory names.
case $ac_val in
-[\\/$]* | ?:[\\/]* ) continue;;
+[\\/$]* | ?:[\\/]* | ?: ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
@@ -1689,6 +1689,58 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
done
+# Backslashes into forward slashes:
+# The following OS/2 specific code is performed AFTER config.site
+# has been loaded to allow users to change their environment there.
+# This strange code is necessary to deal with handling of backslashes by ksh.
+
+if test "$ac_emxsupport" != "no" -a "$ac_emxsupport" != "NO"; then
+ ac_save_IFS="$IFS"
+ IFS="\\"
+ ac_TEMP_PATH=
+ for ac_dir in $PATH; do
+IFS=$ac_save_IFS
+if test -z "$ac_TEMP_PATH"; then
+ ac_TEMP_PATH="$ac_dir"
+else
+ ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
+fi
+ done
+ export PATH="$ac_TEMP_PATH"
+ unset ac_TEMP_PATH
+
+ # Also, make sure that unix-like entries in PATH contain /@unixroot instead
of
+ # hardcoded absolute paths to avoid these hardcoded paths in generated files.
+ if test -n "$UNIXROOT"; then
+ac_save_IFS="$IFS"
+ac_TEMP_UNIXROOT=`echo "$UNIXROOT" | tr [:upper:] [:lower:]`
+IFS="$PATH_SEPARATOR"
+ac_TEMP_PATH=
+for ac_dir in `echo "$PATH" | tr [:upper:] [:lower:]`; do
+ IFS=$ac_save_IFS
+ case "$ac_dir" in
+$ac_TEMP_UNIXROOT/usr/*)
ac_dir="/@unixroot${ac_dir#$ac_TEMP_UNIXROOT}" ;;
+ esac
+ if test -z "$ac_TEMP_PATH"; then
+ac_TEMP_PATH="$ac_dir"
+ else
+ac_TEMP_PATH="$ac_TEMP_PATH$PATH_SEPARATOR$ac_dir"
+ fi
+done
+unset ac_TEMP_UNIXROOT
+export PATH="$ac_TEMP_PATH"
+unset ac_TEMP_PATH
+ fi
+fi
+
+# set ac_executable_extensions!
+if test "$ac_executable_extensions" = ""; then
+ if (sh -c : && sh.exe -c :) >/dev/null 2>/dev/null; then
+ac_executable_extensions=".exe"
+export ac_executable_extensions
+ fi
+fi
+
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
@@ -2533,7 +2585,7 @@ else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
- CFLAGS="