Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add patch required to build gettext-bootstrap on Cygwin. #975

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pkgs/gettext-bootstrap/cygwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Patch incompatibility between gnulib headers and Cygwin (or, more generally,
newlib) as originally reported at
https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html

diff --git a/gettext-tools/gnulib-lib/sys_select.in.h b/gettext-tools/gnulib-lib/sys_select.in.h
index d6d3f9f..7281144 100644
--- a/gettext-tools/gnulib-lib/sys_select.in.h
+++ b/gettext-tools/gnulib-lib/sys_select.in.h
@@ -81,8 +81,9 @@
of 'struct timeval', and no definition of this type.
Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
in <sys/time.h>.
- But avoid namespace pollution on glibc systems. */
-# ifndef __GLIBC__
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin. */
+# if !(defined __GLIBC__ || defined __CYGWIN__)
# include <sys/time.h>
# endif

@@ -100,10 +101,11 @@
#endif

/* Get definition of 'sigset_t'.
- But avoid namespace pollution on glibc systems.
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin.
Do this after the include_next (for the sake of OpenBSD 5.0) but before
the split double-inclusion guard (for the sake of Solaris). */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
+#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
# include <signal.h>
#endif

--
2.5.0

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ defaults:
# /share/doc/gettext/examples/installpaths contains absolute path
relocatable: false

build_stages:
- when: platform == 'Cygwin'
name: patch
before: configure
files: [cygwin.patch]
handler: bash
bash: |
patch -up1 < _hashdist/cygwin.patch

sources:
- url: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.1.tar.gz
key: tar.gz:fb2hdwk335p6wsdcmjd73rjqmyhd2kig
Expand Down
37 changes: 37 additions & 0 deletions pkgs/gettext/cygwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Patch incompatibility between gnulib headers and Cygwin (or, more generally,
newlib) as originally reported at
https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html

diff --git a/gettext-tools/gnulib-lib/sys_select.in.h b/gettext-tools/gnulib-lib/sys_select.in.h
index d6d3f9f..7281144 100644
--- a/gettext-tools/gnulib-lib/sys_select.in.h
+++ b/gettext-tools/gnulib-lib/sys_select.in.h
@@ -81,8 +81,9 @@
of 'struct timeval', and no definition of this type.
Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
in <sys/time.h>.
- But avoid namespace pollution on glibc systems. */
-# ifndef __GLIBC__
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin. */
+# if !(defined __GLIBC__ || defined __CYGWIN__)
# include <sys/time.h>
# endif

@@ -100,10 +101,11 @@
#endif

/* Get definition of 'sigset_t'.
- But avoid namespace pollution on glibc systems.
+ But avoid namespace pollution on glibc systems and "unknown type
+ name" problems on Cygwin.
Do this after the include_next (for the sake of OpenBSD 5.0) but before
the split double-inclusion guard (for the sake of Solaris). */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
+#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
# include <signal.h>
#endif

--
2.5.0

9 changes: 9 additions & 0 deletions pkgs/gettext.yaml → pkgs/gettext/gettext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ extends: [autotools_package]
dependencies:
build: [libiconv]

build_stages:
- when: platform == 'Cygwin'
name: patch
before: configure
files: [cygwin.patch]
handler: bash
bash: |
patch -up1 < _hashdist/cygwin.patch

sources:
- url: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.1.tar.gz
key: tar.gz:fb2hdwk335p6wsdcmjd73rjqmyhd2kig
Expand Down