mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] argtables2: fix building and installing for mingw
@ 2012-05-28 12:42 Bart vdr. Meulen
  2012-05-31 15:29 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Bart vdr. Meulen @ 2012-05-28 12:42 UTC (permalink / raw)
  To: ptxdist

From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>

Update argtables2 packet so that it builds a dynamic library (dll)
for windows.
This is done by telling libtool that argtables will not
have undefined symbol, which is the case for the windows dll.
(otherwise libtool will assume unresolved symbols and
disable dynamic libraries on mingw)

update the rule file so that the dll is installed in the target sysroot

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 .../0001-build-shared-lib-for-mingw.patch          |   31 ++++++++++++++++++++
 patches/argtable2-12/series                        |    1 +
 rules/argtable2.make                               |    4 +++
 3 files changed, 36 insertions(+)
 create mode 100644 patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
 create mode 100644 patches/argtable2-12/series

diff --git a/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
new file mode 100644
index 0000000..e5fb776
--- /dev/null
+++ b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
@@ -0,0 +1,31 @@
+---
+ src/Makefile.am |    2 +-
+ src/Makefile.in |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: argtable2-12/src/Makefile.am
+===================================================================
+--- argtable2-12.orig/src/Makefile.am
++++ argtable2-12/src/Makefile.am
+@@ -17,7 +17,7 @@ libargtable2_la_SOURCES = argtable2.c ar
+ # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
+ # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
+ # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
+-libargtable2_la_LDFLAGS = -version-info 1:7:1
++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined
+ 
+ include_HEADERS = argtable2.h
+ 
+Index: argtable2-12/src/Makefile.in
+===================================================================
+--- argtable2-12.orig/src/Makefile.in
++++ argtable2-12/src/Makefile.in
+@@ -232,7 +232,7 @@ libargtable2_la_SOURCES = argtable2.c ar
+ # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
+ # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
+ # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
+-libargtable2_la_LDFLAGS = -version-info 1:7:1
++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined
+ include_HEADERS = argtable2.h
+ all: config.h
+ 	$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/patches/argtable2-12/series b/patches/argtable2-12/series
new file mode 100644
index 0000000..b7a27e1
--- /dev/null
+++ b/patches/argtable2-12/series
@@ -0,0 +1 @@
+0001-build-shared-lib-for-mingw.patch
diff --git a/rules/argtable2.make b/rules/argtable2.make
index 124d37b..7e8661a 100644
--- a/rules/argtable2.make
+++ b/rules/argtable2.make
@@ -60,7 +60,11 @@ $(STATEDIR)/argtable2.targetinstall:
 	@$(call install_fixup, argtable2,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup, argtable2,DESCRIPTION,missing)
 
+ifdef PTXCONF_ARCH_MINGW
+	@$(call install_copy, argtable2, 0, 0, 0644, -, /usr/bin/libargtable2-0.dll)
+else
 	@$(call install_lib, argtable2, 0, 0, 0644, libargtable2)
+endif
 
 	@$(call install_finish, argtable2)
 
-- 
1.7.9.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] argtables2: fix building and installing for mingw
  2012-05-28 12:42 [ptxdist] [PATCH] argtables2: fix building and installing for mingw Bart vdr. Meulen
@ 2012-05-31 15:29 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-05-31 15:29 UTC (permalink / raw)
  To: ptxdist

On Mon, May 28, 2012 at 02:42:57PM +0200, Bart vdr. Meulen wrote:
> From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>
> 
> Update argtables2 packet so that it builds a dynamic library (dll)
> for windows.
> This is done by telling libtool that argtables will not
> have undefined symbol, which is the case for the windows dll.
> (otherwise libtool will assume unresolved symbols and
> disable dynamic libraries on mingw)
> 
> update the rule file so that the dll is installed in the target sysroot
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  .../0001-build-shared-lib-for-mingw.patch          |   31 ++++++++++++++++++++
>  patches/argtable2-12/series                        |    1 +
>  rules/argtable2.make                               |    4 +++
>  3 files changed, 36 insertions(+)
>  create mode 100644 patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
>  create mode 100644 patches/argtable2-12/series
> 
> diff --git a/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch

Patch header!

> new file mode 100644
> index 0000000..e5fb776
> --- /dev/null
> +++ b/patches/argtable2-12/0001-build-shared-lib-for-mingw.patch
> @@ -0,0 +1,31 @@
> +---
> + src/Makefile.am |    2 +-
> + src/Makefile.in |    2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +Index: argtable2-12/src/Makefile.am
> +===================================================================
> +--- argtable2-12.orig/src/Makefile.am
> ++++ argtable2-12/src/Makefile.am
> +@@ -17,7 +17,7 @@ libargtable2_la_SOURCES = argtable2.c ar
> + # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
> + # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
> + # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
> +-libargtable2_la_LDFLAGS = -version-info 1:7:1
> ++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined

Are you sure this shouldn't be "-Wl,-no-undefined"?

> + 
> + include_HEADERS = argtable2.h
> + 
> +Index: argtable2-12/src/Makefile.in
> +===================================================================
> +--- argtable2-12.orig/src/Makefile.in
> ++++ argtable2-12/src/Makefile.in

don't patch Makefile.in, add a autogen.sh link instead.

> +@@ -232,7 +232,7 @@ libargtable2_la_SOURCES = argtable2.c ar
> + # argtable-2.10 is 1:5:1 (minor tweaks to configuration and documentation, src code is identical to argtable-2.8)
> + # argtable-2.11 is 1:6:1 (minor tweaks to makefiles, src code is identical to argtable-2.8)
> + # argtable-2.12 is 1:7:1 (added support for parsing hex,octal,binary integer formats)
> +-libargtable2_la_LDFLAGS = -version-info 1:7:1
> ++libargtable2_la_LDFLAGS = -version-info 1:7:1 -no-undefined
> + include_HEADERS = argtable2.h
> + all: config.h
> + 	$(MAKE) $(AM_MAKEFLAGS) all-am
> diff --git a/patches/argtable2-12/series b/patches/argtable2-12/series
> new file mode 100644
> index 0000000..b7a27e1
> --- /dev/null
> +++ b/patches/argtable2-12/series
> @@ -0,0 +1 @@
> +0001-build-shared-lib-for-mingw.patch
> diff --git a/rules/argtable2.make b/rules/argtable2.make
> index 124d37b..7e8661a 100644
> --- a/rules/argtable2.make
> +++ b/rules/argtable2.make
> @@ -60,7 +60,11 @@ $(STATEDIR)/argtable2.targetinstall:
>  	@$(call install_fixup, argtable2,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
>  	@$(call install_fixup, argtable2,DESCRIPTION,missing)
>  
> +ifdef PTXCONF_ARCH_MINGW
> +	@$(call install_copy, argtable2, 0, 0, 0644, -, /usr/bin/libargtable2-0.dll)
> +else
>  	@$(call install_lib, argtable2, 0, 0, 0644, libargtable2)
> +endif

I think it would be better to fix install_lib for mingw here.

Michael

>  
>  	@$(call install_finish, argtable2)
>  
> -- 
> 1.7.9.5
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-31 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 12:42 [ptxdist] [PATCH] argtables2: fix building and installing for mingw Bart vdr. Meulen
2012-05-31 15:29 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox