Patches for Cygwin, provided by Corinna Vinschen <vinschen@redhat.com>
authorRichard Levitte <levitte@openssl.org>
Sat, 21 May 2005 16:41:34 +0000 (16:41 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 21 May 2005 16:41:34 +0000 (16:41 +0000)
Makefile.org
Makefile.shared
engines/Makefile
util/cygwin.sh

index 5deb19a0167093dc4d8ef59e27f241f5565cbfcc..a67c3c1eed235ef89aa7d9166689268858a30ec6 100644 (file)
@@ -276,7 +276,7 @@ Makefile: Makefile.org Configure config
        @false
 
 libclean:
-       rm -f *.map *.so *.so.* engines/*.so *.a */lib */*/lib
+       rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
 
 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
@@ -476,13 +476,13 @@ install_sw:
                                        chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
                                else \
-                                       c=`echo $$i | sed 's/^lib/cyg/'`; \
+                                       c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
                                        cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
-                                       cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
-                                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new; \
-                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
+                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+                                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
+                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
                                fi ); \
                        fi; \
                done; \
index 5afd419f9a4c3228710df8bfd5e23e530120a1f0..6f0f5ce4a6bf36dfa953a9542dd48d146b05c28b 100644 (file)
@@ -229,7 +229,8 @@ link_o.cygwin:
        SHLIB=cyg$(LIBNAME); \
        expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
        SHLIB_SUFFIX=.dll; \
-       SHLIB_SOVER=-$(LIBVERSION); \
+       LIBVERSION="$(LIBVERSION)"; \
+       SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
        ALLSYMSFLAGS='-Wl,--whole-archive'; \
        NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
        SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
@@ -240,16 +241,16 @@ link_a.cygwin:
        SHLIB=cyg$(LIBNAME); \
        expr $(PLATFORM) : 'mingw' > /dev/null && SHLIB=$(LIBNAME)eay32; \
        SHLIB_SUFFIX=.dll; \
-       SHLIB_SOVER=; \
+       SHLIB_SOVER=-$(LIBVERSION); \
        ALLSYMSFLAGS='-Wl,--whole-archive'; \
        NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-       base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x61200000; \
+       base=;  [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
        SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a"; \
        [ -f apps/$$SHLIB$$SHLIB_SUFFIX ] && rm apps/$$SHLIB$$SHLIB_SUFFIX; \
        [ -f test/$$SHLIB$$SHLIB_SUFFIX ] && rm test/$$SHLIB$$SHLIB_SUFFIX; \
        $(LINK_SO_A) || exit 1; \
-       cp -p $$SHLIB$$SHLIB_SUFFIX apps/; \
-       cp -p $$SHLIB$$SHLIB_SUFFIX test/
+       cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX apps/; \
+       cp -p $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX test/
 link_app.cygwin:
        $(LINK_APP)
 
index d415a1c85b678c052b019b64e7682e3f10cc1453..bf19edfe0b64fc0c9fce0e8a1b4022b23bbb837d 100644 (file)
@@ -82,14 +82,19 @@ files:
 links:
 
 # XXXXX This currently only works on systems that use .so as suffix
-# for shared libraries.
+# for shared libraries as well as for Cygwin which uses the
+# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
 install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                for l in $(LIBNAMES); do \
                        ( echo installing $$l; \
-                         cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
+                         if [ "$(PLATFORM)" != "Cygwin" ]; then \
+                                 cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
+                         else \
+                                 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
+                         fi; \
                          chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
                          mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \
                done; \
index 7f791d47f4bbd97239c2dc2955810af27857e29a..fabbf842258458569f1e19550ed0d68f665f1812 100755 (executable)
@@ -47,6 +47,14 @@ function doc_install()
   create_cygwin_readme
 }
 
+function certs_install()
+{
+  CERTS_DIR=${INSTALL_PREFIX}/usr/ssl/certs
+
+  mkdir -p ${CERTS_DIR}
+  cp -rp certs/* ${CERTS_DIR}
+}
+
 function create_cygwin_readme()
 {
   README_DIR=${INSTALL_PREFIX}/usr/share/doc/Cygwin
@@ -104,6 +112,8 @@ base_install
 
 doc_install
 
+certs_install
+
 create_cygwin_readme
 
 create_profile_files
@@ -112,11 +122,13 @@ cd ${INSTALL_PREFIX}
 strip usr/bin/*.exe usr/bin/*.dll
 
 # Runtime package
-find etc usr/bin usr/share/doc usr/ssl/certs usr/ssl/man/man[157] \
-     usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d |
+find etc usr/bin usr/lib/engines usr/share/doc usr/ssl/certs \
+     usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf usr/ssl/private \
+     -empty -o \! -type d |
 tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 -
 # Development package
-find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d |
+find usr/include usr/lib/*.a usr/lib/pkgconfig usr/ssl/man/man3 \
+     -empty -o \! -type d |
 tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 -
 
 ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2