From 806e20db1a7d21d002399f0254ca90d5f98b28b8 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Tue, 6 Dec 2016 17:34:53 +0100 Subject: [PATCH] Patch gdbm on Cygwin so that it can build a shared library --- pkgs/gdbm.yaml | 8 -------- pkgs/gdbm/gdbm-cygwin.patch | 24 ++++++++++++++++++++++++ pkgs/gdbm/gdbm.yaml | 17 +++++++++++++++++ 3 files changed, 41 insertions(+), 8 deletions(-) delete mode 100644 pkgs/gdbm.yaml create mode 100644 pkgs/gdbm/gdbm-cygwin.patch create mode 100644 pkgs/gdbm/gdbm.yaml diff --git a/pkgs/gdbm.yaml b/pkgs/gdbm.yaml deleted file mode 100644 index 43ac606ce..000000000 --- a/pkgs/gdbm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -extends: [autotools_package] - -defaults: - relocatable: false - -sources: -- key: tar.gz:rwis6rhqlufrljff3fvhn6cs5ec5aun3 - url: http://ftp.heanet.ie/mirrors/gnu/gdbm/gdbm-1.11.tar.gz diff --git a/pkgs/gdbm/gdbm-cygwin.patch b/pkgs/gdbm/gdbm-cygwin.patch new file mode 100644 index 000000000..c7dbebda5 --- /dev/null +++ b/pkgs/gdbm/gdbm-cygwin.patch @@ -0,0 +1,24 @@ +diff -ruN a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2013-05-21 13:17:36.000000000 +0200 ++++ b/src/Makefile.am 2016-12-06 17:31:14.234051600 +0100 +@@ -65,7 +65,7 @@ + update.c\ + version.c + +-libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) ++libgdbm_la_LDFLAGS = -no-undefined -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) + + noinst_LIBRARIES = libgdbmapp.a + +diff -ruN a/src/Makefile.in b/src/Makefile.in +--- a/src/Makefile.in 2013-12-25 16:58:27.000000000 +0100 ++++ b/src/Makefile.in 2016-12-06 17:31:28.344073600 +0100 +@@ -461,7 +461,7 @@ + update.c\ + version.c + +-libgdbm_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) ++libgdbm_la_LDFLAGS = -no-undefined -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) + noinst_LIBRARIES = libgdbmapp.a + libgdbmapp_a_SOURCES = \ + err.c\ diff --git a/pkgs/gdbm/gdbm.yaml b/pkgs/gdbm/gdbm.yaml new file mode 100644 index 000000000..1279fee04 --- /dev/null +++ b/pkgs/gdbm/gdbm.yaml @@ -0,0 +1,17 @@ +extends: [autotools_package] + +defaults: + relocatable: false + +build_stages: + - when: platform == 'Cygwin' + name: patch + before: configure + files: [gdbm-cygwin.patch] + handler: bash + bash: | + patch -up1 < _hashdist/gdbm-cygwin.patch + +sources: +- key: tar.gz:rwis6rhqlufrljff3fvhn6cs5ec5aun3 + url: http://ftp.heanet.ie/mirrors/gnu/gdbm/gdbm-1.11.tar.gz