Blame otp-R11B-2-0006-Fix-missing-ssl-libraries-in-EPEL.patch

Peter Lemenkov 03eee9
From 8fbb7446060768f03912ec903992bcf57e8d6974 Mon Sep 17 00:00:00 2001
Peter Lemenkov 03eee9
From: Peter Lemenkov <lemenkov@gmail.com>
Peter Lemenkov 03eee9
Date: Mon, 19 Apr 2010 13:39:17 +0400
Peter Lemenkov 03eee9
Subject: [PATCH 6/8] Fix missing ssl-libraries in EPEL
Peter Lemenkov 03eee9
Peter Lemenkov 03eee9
---
Peter Lemenkov 03eee9
 lib/ssl/c_src/Makefile.in  |    2 +-
Peter Lemenkov 03eee9
 lib/ssl/c_src/Makefile.in~ |  186 ++++++++++++++++++++++++++++++++++++++++++++
Peter Lemenkov 03eee9
 2 files changed, 187 insertions(+), 1 deletions(-)
Peter Lemenkov 03eee9
 create mode 100644 lib/ssl/c_src/Makefile.in~
Peter Lemenkov 03eee9
Peter Lemenkov 03eee9
diff --git a/lib/ssl/c_src/Makefile.in b/lib/ssl/c_src/Makefile.in
Peter Lemenkov 03eee9
index b145aac..20f8dc8 100644
Peter Lemenkov 03eee9
--- a/lib/ssl/c_src/Makefile.in
Peter Lemenkov 03eee9
+++ b/lib/ssl/c_src/Makefile.in
Peter Lemenkov 03eee9
@@ -38,7 +38,7 @@ VSN=$(SSL_VSN)
Peter Lemenkov 03eee9
 CC = @CC@
Peter Lemenkov 03eee9
 LD = @LD@
Peter Lemenkov 03eee9
 SHELL = /bin/sh
Peter Lemenkov 03eee9
-LIBS = @LIBS@
Peter Lemenkov 03eee9
+LIBS = @LIBS@ -lkeyutils -lselinux
Peter Lemenkov 03eee9
 
Peter Lemenkov 03eee9
 # ----------------------------------------------------
Peter Lemenkov 03eee9
 # Includes and libs
Peter Lemenkov 03eee9
diff --git a/lib/ssl/c_src/Makefile.in~ b/lib/ssl/c_src/Makefile.in~
Peter Lemenkov 03eee9
new file mode 100644
Peter Lemenkov 03eee9
index 0000000..b145aac
Peter Lemenkov 03eee9
--- /dev/null
Peter Lemenkov 03eee9
+++ b/lib/ssl/c_src/Makefile.in~
Peter Lemenkov 03eee9
@@ -0,0 +1,186 @@
Peter Lemenkov 03eee9
+# ``The contents of this file are subject to the Erlang Public License,
Peter Lemenkov 03eee9
+# Version 1.1, (the "License"); you may not use this file except in
Peter Lemenkov 03eee9
+# compliance with the License. You should have received a copy of the
Peter Lemenkov 03eee9
+# Erlang Public License along with this software. If not, it can be
Peter Lemenkov 03eee9
+# retrieved via the world wide web at http://www.erlang.org/.
Peter Lemenkov 03eee9
+# 
Peter Lemenkov 03eee9
+# Software distributed under the License is distributed on an "AS IS"
Peter Lemenkov 03eee9
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
Peter Lemenkov 03eee9
+# the License for the specific language governing rights and limitations
Peter Lemenkov 03eee9
+# under the License.
Peter Lemenkov 03eee9
+# 
Peter Lemenkov 03eee9
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
Peter Lemenkov 03eee9
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
Peter Lemenkov 03eee9
+# AB. All Rights Reserved.''
Peter Lemenkov 03eee9
+# 
Peter Lemenkov 03eee9
+#     $Id$
Peter Lemenkov 03eee9
+#
Peter Lemenkov 03eee9
+# Makefile only for Unix and Win32/Cygwin.
Peter Lemenkov 03eee9
+# 
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+include $(ERL_TOP)/make/target.mk
Peter Lemenkov 03eee9
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# SSL locations and include options from configure
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+SSL_LIBDIR = @SSL_LIBDIR@
Peter Lemenkov 03eee9
+SSL_INCLUDE = @SSL_INCLUDE@
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Application version
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+include ../vsn.mk
Peter Lemenkov 03eee9
+VSN=$(SSL_VSN)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Commands 
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+CC = @CC@
Peter Lemenkov 03eee9
+LD = @LD@
Peter Lemenkov 03eee9
+SHELL = /bin/sh
Peter Lemenkov 03eee9
+LIBS = @LIBS@
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Includes and libs
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ALL_CFLAGS = @WFLAGS@ @CFLAGS@ @DEFS@ $(TYPE_FLAGS)
Peter Lemenkov 03eee9
+TARGET = @host@
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ifeq ($(TYPE),debug)
Peter Lemenkov 03eee9
+TYPEMARKER = .debug
Peter Lemenkov 03eee9
+TYPE_FLAGS = -g -DDEBUG @DEBUG_FLAGS@
Peter Lemenkov 03eee9
+else
Peter Lemenkov 03eee9
+TYPEMARKER =
Peter Lemenkov 03eee9
+TYPE_FLAGS = -O2
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+PRIVDIR = ../priv
Peter Lemenkov 03eee9
+BINDIR = $(PRIVDIR)/bin/$(TARGET)
Peter Lemenkov 03eee9
+OBJDIR = $(PRIVDIR)/obj/$(TARGET)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# File suffixes
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+exe = @EXEEXT@
Peter Lemenkov 03eee9
+obj = .@OBJEXT@
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Release directory specification
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+RELSYSDIR = $(RELEASE_PATH)/lib/ssl-$(VSN)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Common Macros
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+OBJS = 	$(OBJDIR)/esock$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/debuglog$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/esock_poll$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/esock_osio$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/esock_utils$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/esock_posix_str$(obj) \
Peter Lemenkov 03eee9
+	$(OBJDIR)/esock_openssl$(obj)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+PORT_PROGRAM = $(BINDIR)/ssl_esock$(exe)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ifneq ($(TARGET),win32)
Peter Lemenkov 03eee9
+SSL_MAKEFILE = $(OBJDIR)/Makefile
Peter Lemenkov 03eee9
+SKIP_BUILDING_BINARIES := false
Peter Lemenkov 03eee9
+else
Peter Lemenkov 03eee9
+ifeq ($(HOST_OS),)
Peter Lemenkov 03eee9
+HOST_OS := $(shell $(ERL_TOP)/erts/autoconf/config.guess)
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+ifeq ($(findstring solaris,$(HOST_OS)),solaris)
Peter Lemenkov 03eee9
+SKIP_BUILDING_BINARIES := true
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+CC_R_FLAG=
Peter Lemenkov 03eee9
+ifeq ($(findstring @,$(CC_R_FLAG)),@)
Peter Lemenkov 03eee9
+# Old erts configure used which hasn't replaced @CFLAG_RUNTIME_LIBRARY_PATH@;
Peter Lemenkov 03eee9
+# we try our best here instead...
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ifeq ($(findstring darwin,$(TARGET)),darwin)	# darwin: no flag
Peter Lemenkov 03eee9
+CC_R_FLAG =
Peter Lemenkov 03eee9
+else
Peter Lemenkov 03eee9
+ifeq ($(findstring osf,$(TARGET)),osf)		# osf1: -Wl,-rpath,
Peter Lemenkov 03eee9
+CC_R_FLAG =
Peter Lemenkov 03eee9
+else						# Default: -Wl,-R
Peter Lemenkov 03eee9
+CC_R_FLAG =
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ifeq ($(strip $(CC_R_FLAG)),)
Peter Lemenkov 03eee9
+CC_R_OPT =
Peter Lemenkov 03eee9
+else
Peter Lemenkov 03eee9
+CC_R_OPT = $(CC_R_FLAG)$(SSL_LIBDIR)
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Targets
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+ifeq ($(SKIP_BUILDING_BINARIES), true)
Peter Lemenkov 03eee9
+debug opt:
Peter Lemenkov 03eee9
+else
Peter Lemenkov 03eee9
+debug opt: $(OBJDIR) $(BINDIR) $(OBJS) $(PORT_PROGRAM) $(SSL_MAKEFILE)
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+$(OBJDIR):
Peter Lemenkov 03eee9
+	-@mkdir -p $(OBJDIR)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+$(BINDIR):
Peter Lemenkov 03eee9
+	-@mkdir -p $(BINDIR)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+$(OBJDIR)/esock_openssl$(obj):	esock_openssl.c
Peter Lemenkov 03eee9
+	$(CC) -c -o $@ $(ALL_CFLAGS) $(SSL_INCLUDE) $<
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+$(OBJDIR)/%$(obj): %.c
Peter Lemenkov 03eee9
+	$(CC) -c -o $@ $(ALL_CFLAGS) $<
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# Unix
Peter Lemenkov 03eee9
+$(BINDIR)/ssl_esock: $(OBJS)
Peter Lemenkov 03eee9
+	$(CC) -L$(SSL_LIBDIR) $(CC_R_OPT) -o $@ $^ \
Peter Lemenkov 03eee9
+		$(LIBS) -lssl -lcrypto
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# Win32/Cygwin
Peter Lemenkov 03eee9
+$(BINDIR)/ssl_esock.exe: $(OBJS)
Peter Lemenkov 03eee9
+	$(LD) -L$(SSL_LIBDIR) -o $@ $^ -lwsock32 -llibeay32 -lssleay32
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# Unix only
Peter Lemenkov 03eee9
+$(SSL_MAKEFILE):
Peter Lemenkov 03eee9
+	sed 	-e "s;%BINDIR%;../../bin/$(TARGET);" \
Peter Lemenkov 03eee9
+		-e "s;%SSL_LIBDIR%;$(SSL_LIBDIR);" \
Peter Lemenkov 03eee9
+		-e "s;%OBJS;$(OBJS);" \
Peter Lemenkov 03eee9
+		-e "s;%LIBS%;$(LIBS);" ./Makefile.dist \
Peter Lemenkov 03eee9
+		> $(OBJDIR)/Makefile
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+clean:
Peter Lemenkov 03eee9
+	rm -f $(PORT_PROGRAM) $(OBJS) core *~ $(SSL_MAKEFILE)
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+docs:
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+# ----------------------------------------------------
Peter Lemenkov 03eee9
+# Release Target
Peter Lemenkov 03eee9
+# ---------------------------------------------------- 
Peter Lemenkov 03eee9
+include $(ERL_TOP)/make/otp_release_targets.mk
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+release_spec: opt
Peter Lemenkov 03eee9
+	$(INSTALL_DIR) $(RELSYSDIR)/priv/bin
Peter Lemenkov 03eee9
+	$(INSTALL_DIR) $(RELSYSDIR)/priv/obj
Peter Lemenkov 03eee9
+	$(INSTALL_DATA) $(OBJS) $(RELSYSDIR)/priv/obj
Peter Lemenkov 03eee9
+	$(INSTALL_PROGRAM) $(PORT_PROGRAM) $(RELSYSDIR)/priv/bin
Peter Lemenkov 03eee9
+ifneq ($(TARGET),win32)
Peter Lemenkov 03eee9
+	sed 	-e "s;%BINDIR%;../bin;" \
Peter Lemenkov 03eee9
+		-e "s;%SSL_LIBDIR%;$(SSL_LIBDIR);" \
Peter Lemenkov 03eee9
+		-e "s;%OBJS;$(OBJS);" \
Peter Lemenkov 03eee9
+		-e "s;%LIBS%;$(LIBS);" ./Makefile.dist \
Peter Lemenkov 03eee9
+		> $(RELSYSDIR)/priv/obj/Makefile
Peter Lemenkov 03eee9
+endif
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
+release_docs_spec:
Peter Lemenkov 03eee9
+
Peter Lemenkov 03eee9
-- 
Peter Lemenkov 03eee9
1.6.6.1
Peter Lemenkov 03eee9