xref: /trunk/main/libxmlsec/xmlsec1-os2.patch (revision 66d4592e)
1--- misc/xmlsec1-1.2.14/src/Makefile.in	2009-12-05 22:19:34.000000000 +0100
2+++ misc/build/xmlsec1-1.2.14/src/Makefile.in	2014-11-26 22:02:00.000000000 +0100
3@@ -12,6 +12,11 @@
4 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
5 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
6 # PARTICULAR PURPOSE.
7+
8+OS2_LA_NAME=xmlsec1
9+OS2_DLL_NAME=xmlsec1
10+OS2_DLL_OBJ=$(libxmlsec1_la_OBJECTS:%.lo=%.o)
11+OS2_DLL_LIBS=-lxml2 -lz -lm -lurpo -lmmap -lpthread $(LIBS)
12
13 @SET_MAKE@
14
15@@ -736,7 +741,7 @@
16 	done
17 check-am: all-am
18 check: check-recursive
19-all-am: Makefile $(LTLIBRARIES)
20+all-am: Makefile $(LTLIBRARIES) $(OS2_DLL_NAME).dll
21 installdirs: installdirs-recursive
22 installdirs-am:
23 	for dir in "$(DESTDIR)$(libdir)"; do \
24@@ -861,3 +866,13 @@
25 # Tell versions [3.59,3.63) of GNU make to not export all variables.
26 # Otherwise a system limit (for SysV at least) may be exceeded.
27 .NOEXPORT:
28+
29+$(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la
30+	cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a
31+	echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def
32+	echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def
33+	echo "EXPORTS" >> $(OS2_DLL_NAME).def
34+	emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def
35+	gcc -g -Zbin-files -Zhigh-mem -Zomf -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS)
36+	emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def
37+	emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def
38--- misc/xmlsec1-1.2.14/src/nss/Makefile.in	2014-11-26 22:02:36.000000000 +0100
39+++ misc/build/xmlsec1-1.2.14/src/nss/Makefile.in	2014-11-26 22:02:28.000000000 +0100
40@@ -12,6 +12,11 @@
41 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
42 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
43 # PARTICULAR PURPOSE.
44+
45+OS2_LA_NAME=xmlsec1-nss
46+OS2_DLL_NAME=xmlsec1n
47+OS2_DLL_OBJ=$(libxmlsec1_nss_la_OBJECTS:%.lo=%.o)
48+OS2_DLL_LIBS=-l../.libs/xmlsec1 -lxml2  -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4  $(LIBS)
49
50 @SET_MAKE@
51
52@@ -691,7 +696,7 @@
53 	done
54 check-am: all-am
55 check: check-am
56-all-am: Makefile $(LTLIBRARIES)
57+all-am: Makefile $(LTLIBRARIES) $(OS2_DLL_NAME).dll
58 installdirs:
59 	for dir in "$(DESTDIR)$(libdir)"; do \
60 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
61@@ -812,3 +817,13 @@
62 # Tell versions [3.59,3.63) of GNU make to not export all variables.
63 # Otherwise a system limit (for SysV at least) may be exceeded.
64 .NOEXPORT:
65+
66+$(OS2_DLL_NAME).dll: lib$(OS2_LA_NAME).la
67+	cp .libs/$(OS2_LA_NAME).a .libs/$(OS2_LA_NAME)_s.a
68+	echo "LIBRARY $(OS2_DLL_NAME) INITINSTANCE TERMINSTANCE" > $(OS2_DLL_NAME).def
69+	echo "DATA MULTIPLE" >> $(OS2_DLL_NAME).def
70+	echo "EXPORTS" >> $(OS2_DLL_NAME).def
71+	emxexp $(OS2_DLL_OBJ) >> $(OS2_DLL_NAME).def
72+	gcc -g -Zbin-files -Zhigh-mem -Zomf -Zdll $(OS2_DLL_NAME).def -o $@ $(OS2_DLL_OBJ) $(OS2_DLL_LIBS)
73+	emximp -o .libs/$(OS2_LA_NAME).a $(OS2_DLL_NAME).def
74+	emximp -o .libs/$(OS2_LA_NAME).lib $(OS2_DLL_NAME).def
75--- misc/xmlsec1-1.2.14/src/nss/keywrapers.c	2014-11-26 21:59:58.000000000 +0100
76+++ misc/build/xmlsec1-1.2.14/src/nss/keywrapers.c	2014-11-26 21:50:14.000000000 +0100
77@@ -1126,7 +1126,7 @@
78     NULL,					/* void* reserved1; */
79 };
80
81-#ifndef __MINGW32__
82+#if !defined(__MINGW32__) && !defined(__KLIBC__)
83 /**
84  * xmlSecNssTransformKWAes128GetKlass:
85  *
86@@ -1199,7 +1199,7 @@
87     NULL,					/* void* reserved1; */
88 };
89
90-#ifndef __MINGW32__
91+#if !defined(__MINGW32__) && !defined(__KLIBC__)
92 /**
93  * xmlSecNssTransformKWDes3GetKlass:
94  *
95