summaryrefslogtreecommitdiffstats
path: root/contrib/libgnurx/P00-mingw-static.patch
blob: 9430042cfe0808a0e08514c4651d3fcba4a025c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff -ur mingw-libgnurx-2.5.1.orig/Makefile.in mingw-libgnurx-2.5.1/Makefile.in
--- mingw-libgnurx-2.5.1.orig/Makefile.in	2007-05-07 15:28:28.000000000 -0400
+++ mingw-libgnurx-2.5.1/Makefile.in	2014-10-26 02:56:15.000000000 -0400
@@ -38,6 +38,7 @@
 bindir = @bindir@
 mandir = @mandir@
 
+AR = @AR@
 CC = @CC_QUALIFIED@
 CFLAGS = @CFLAGS@ -I ${srcdir}
 LDFLAGS = @LDFLAGS@
@@ -72,11 +73,19 @@
 libregex.a: libgnurx.dll.a
 	cp -p libgnurx.dll.a $@
 
+libregex.a-static: $(OBJECTS)
+	$(AR) rcsu libregex.a $(OBJECTS)
+
 gnurx.lib: libgnurx-$(DLLVERSION).dll
 	$(MSVCLIB) -def:libgnurx.def -out:gnurx.lib
 
 install: install-dll @install_dev@
 
+install-static: libregex.a
+	mkdir -p ${includedir} ${libdir}
+	cp -p ${srcdir}/regex.h ${includedir}
+	cp -p ${srcdir}/libregex.a ${libdir}
+
 install-dll:
 	mkdir -p ${bindir}
 	cp -p $(BINDIST_FILES) ${bindir}
diff -ur mingw-libgnurx-2.5.1.orig/configure.ac mingw-libgnurx-2.5.1/configure.ac
--- mingw-libgnurx-2.5.1.orig/configure.ac	2014-10-26 02:48:55.000000000 -0400
+++ mingw-libgnurx-2.5.1/configure.ac	2014-10-26 02:49:13.000000000 -0400
@@ -75,6 +75,7 @@
 #
   AC_SUBST([GNURX_LIB])
   AC_SUBST([CC_QUALIFIED], ["$CC $CC_QUALIFIED"])
+  AC_SUBST([AR])
   LDFLAGS="$LDFLAGS -Wl,--enable-auto-image-base -Wl,--out-implib,libgnurx.dll.a"
   test -n "${GNURX_LIB}" && LDFLAGS="$LDFLAGS -Wl,--output-def,libgnurx.def"
   AC_CONFIG_FILES([Makefile])