[mingw-plibc] Initial package commit.

mooninite mooninite at fedoraproject.org
Mon Feb 10 23:58:11 UTC 2014


commit 5c19870ced3d1d22fd51198bac3d9be59c13d51f
Author: Michael Cronenworth <mike at cchtml.com>
Date:   Mon Feb 10 17:58:40 2014 -0600

    Initial package commit.

 .gitignore                |    1 +
 mingw-plibc.spec          |   93 +++++++++++++++++++++++++++++++++++++++++++++
 plibc-mingw-include.patch |   31 +++++++++++++++
 sources                   |    1 +
 4 files changed, 126 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6d13a95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/plibc-code-147-trunk.zip
diff --git a/mingw-plibc.spec b/mingw-plibc.spec
new file mode 100644
index 0000000..8797fd7
--- /dev/null
+++ b/mingw-plibc.spec
@@ -0,0 +1,93 @@
+%{?mingw_package_header}
+
+%global snapshot_rev 147
+
+Name:           mingw-plibc
+Version:        0.1.7
+Release:        0.1.20130812svn%{snapshot_rev}%{?dist}
+Summary:        MinGW package for plibc
+
+License:        LGPLv2+
+URL:            http://plibc.sourceforge.net/
+# SourceForge CRM links change often
+# Nagivate your web browser to http://sourceforge.net/p/plibc/code/%{snapshot_rev}/tarball?path=/trunk
+Source0:        plibc-code-%{snapshot_rev}-trunk.zip
+# include fix, sent upstream
+Patch100:       plibc-mingw-include.patch
+
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 95
+BuildRequires:  mingw32-gcc
+
+BuildRequires:  mingw64-filesystem >= 95
+BuildRequires:  mingw64-gcc
+
+BuildRequires:  autoconf automake libtool-ltdl-devel
+
+
+%description
+plibc - POSIX compliant libc extension for Windows
+
+
+# Mingw32
+%package -n mingw32-plibc
+Summary:        %{summary}
+
+%description -n mingw32-plibc
+plibc - POSIX compliant libc extension for Windows
+
+
+# Mingw64
+%package -n mingw64-plibc
+Summary:        %{summary}
+
+
+%description -n mingw64-plibc
+plibc - POSIX compliant libc extension for Windows
+
+
+%?mingw_debug_package
+
+
+%prep
+%setup -q -n plibc-code-147-trunk/plibc
+%patch100 -p2 -b .mingw-include
+
+
+%build
+sh ./bootstrap
+%mingw_configure
+%mingw_make %{?_smp_mflags}
+
+
+%install
+%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
+
+
+# Drop all .la files
+find $RPM_BUILD_ROOT -name "*.la" -delete
+
+
+# Win32
+%files -n mingw32-plibc
+%doc COPYING
+%{mingw32_bindir}/libplibc-1.dll
+%{mingw32_includedir}/langinfo.h
+%{mingw32_includedir}/plibc.h
+%{mingw32_libdir}/libplibc.dll.a
+
+
+# Win64
+%files -n mingw64-plibc
+%doc COPYING
+%{mingw64_bindir}/libplibc-1.dll
+%{mingw64_includedir}/langinfo.h
+%{mingw64_includedir}/plibc.h
+%{mingw64_libdir}/libplibc.dll.a
+
+
+%changelog
+* Mon Feb 10 2014 Michael Cronenworth <mike at cchtml.com> - 0.1.7-0.1.20130812svn147
+- Initial RPM release.
+
diff --git a/plibc-mingw-include.patch b/plibc-mingw-include.patch
new file mode 100644
index 0000000..1919197
--- /dev/null
+++ b/plibc-mingw-include.patch
@@ -0,0 +1,31 @@
+--- plibc-code-147-trunk/plibc/src/include/plibc.h.orig	2013-08-12 06:14:10.000000000 -0500
++++ plibc-code-147-trunk/plibc/src/include/plibc.h	2013-08-30 17:01:01.975554282 -0500
+@@ -520,7 +520,9 @@
+ 
+ int flock(int fd, int operation);
+ int fsync(int fildes);
++#ifndef __MINGW64_VERSION_MAJOR
+ int inet_pton(int af, const char *src, void *dst);
++#endif
+ int inet_pton4(const char *src, u_char *dst, int pton);
+ #if USE_IPV6
+ int inet_pton6(const char *src, u_char *dst);
+@@ -532,7 +534,9 @@
+ const char *hstrerror(int err);
+ int mkstemp(char *tmplate);
+ char *strptime (const char *buf, const char *format, struct tm *tm);
++#ifndef __MINGW64_VERSION_MAJOR
+ const char *inet_ntop(int af, const void *src, char *dst, size_t size);
++#endif
+ #ifndef gmtime_r
+ struct tm *gmtime_r(const time_t *clock, struct tm *result);
+ #endif
+@@ -565,7 +569,7 @@
+ int _win_ftruncate(int fildes, off_t length);
+ int _win_kill(pid_t pid, int sig);
+ int _win_pipe(int *phandles);
+-intptr_t _win_mkfifo(const char *path, mode_t mode);
++int _win_mkfifo(const char *path, mode_t mode);
+ int _win_rmdir(const char *path);
+ int _win_access( const char *path, int mode );
+ int _win_chmod(const char *filename, int pmode);
diff --git a/sources b/sources
index e69de29..ce2951d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f8b933f1367d2d457f42a56c4dd6aff0  plibc-code-147-trunk.zip


More information about the scm-commits mailing list