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

index 7fa4b52a96517d9264b412d94fe00c5650e2e5fb..89e074f5c9751e6fd44801525627b3ccf3f9e7f1 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 827b01d8ebba7c43a7313901e797b75f2c8dec1b..6d6876193770cb2f4203f40a42caa9d00b238003 100644 (file)
@@ -231,7 +231,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"; \
@@ -242,16 +243,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 483ed7237def97050a40c8f0522e4cf66ae4bbe0..9ac5471ac6dbc0c5577485c9e296c534a991d7a7 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