gss-git: New package.
This commit is contained in:
20
mingw-w64-gss-git/001-autoconf.patch
Normal file
20
mingw-w64-gss-git/001-autoconf.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- gss/configure.ac.orig 2014-07-17 22:37:16.926200000 +0400
|
||||
+++ gss/configure.ac 2014-07-17 22:37:25.147400000 +0400
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
+AC_USE_SYSTEM_EXTENSIONS
|
||||
+AM_PROG_AR
|
||||
gl_EARLY
|
||||
libgl_EARLY
|
||||
srcgl_EARLY
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
# Internationalization.
|
||||
AM_GNU_GETTEXT([external])
|
||||
-AM_GNU_GETTEXT_VERSION([0.18.1])
|
||||
+AM_GNU_GETTEXT_VERSION([0.18.3])
|
||||
|
||||
# For gnulib stuff.
|
||||
gl_INIT
|
||||
209
mingw-w64-gss-git/002-gnulib.patch
Normal file
209
mingw-w64-gss-git/002-gnulib.patch
Normal file
@@ -0,0 +1,209 @@
|
||||
diff --git a/src/gl/msvc-inval.c b/src/gl/msvc-inval.c
|
||||
--- a/src/gl/msvc-inval.c
|
||||
+++ b/src/gl/msvc-inval.c
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
|
||||
|
||||
-static void cdecl
|
||||
+static void __cdecl
|
||||
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
|
||||
const wchar_t *function,
|
||||
const wchar_t *file,
|
||||
@@ -45,7 +45,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
|
||||
|
||||
# if defined _MSC_VER
|
||||
|
||||
-static void cdecl
|
||||
+static void __cdecl
|
||||
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
|
||||
const wchar_t *function,
|
||||
const wchar_t *file,
|
||||
@@ -94,7 +94,7 @@ gl_msvc_inval_current (void)
|
||||
}
|
||||
}
|
||||
|
||||
-static void cdecl
|
||||
+static void __cdecl
|
||||
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
|
||||
const wchar_t *function,
|
||||
const wchar_t *file,
|
||||
--- /dev/null 2014-07-18 12:33:18.000000000 +0400
|
||||
+++ b/src/gl/getline.c 2014-07-18 12:30:11.369400000 +0400
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* getline.c --- Implementation of replacement getline function.
|
||||
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU General Public License as
|
||||
+ published by the Free Software Foundation; either version 3, or (at
|
||||
+ your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful, but
|
||||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* Written by Simon Josefsson. */
|
||||
+
|
||||
+#include <config.h>
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+ssize_t
|
||||
+getline (char **lineptr, size_t *n, FILE *stream)
|
||||
+{
|
||||
+ return getdelim (lineptr, n, '\n', stream);
|
||||
+}
|
||||
--- /dev/null 2014-07-18 12:43:49.000000000 +0400
|
||||
+++ b/src/gl/getdelim.c 2014-07-18 12:30:11.369400000 +0400
|
||||
@@ -0,0 +1,135 @@
|
||||
+/* getdelim.c --- Implementation of replacement getdelim function.
|
||||
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2013 Free Software
|
||||
+ Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU General Public License as
|
||||
+ published by the Free Software Foundation; either version 3, or (at
|
||||
+ your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful, but
|
||||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* Ported from glibc by Simon Josefsson. */
|
||||
+
|
||||
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
|
||||
+ optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */
|
||||
+#define _GL_ARG_NONNULL(params)
|
||||
+
|
||||
+#include <config.h>
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include <limits.h>
|
||||
+#include <stdint.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+#ifndef SSIZE_MAX
|
||||
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
|
||||
+#endif
|
||||
+
|
||||
+#if USE_UNLOCKED_IO
|
||||
+# include "unlocked-io.h"
|
||||
+# define getc_maybe_unlocked(fp) getc(fp)
|
||||
+#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED
|
||||
+# undef flockfile
|
||||
+# undef funlockfile
|
||||
+# define flockfile(x) ((void) 0)
|
||||
+# define funlockfile(x) ((void) 0)
|
||||
+# define getc_maybe_unlocked(fp) getc(fp)
|
||||
+#else
|
||||
+# define getc_maybe_unlocked(fp) getc_unlocked(fp)
|
||||
+#endif
|
||||
+
|
||||
+/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
|
||||
+ NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
|
||||
+ NULL), pointing to *N characters of space. It is realloc'ed as
|
||||
+ necessary. Returns the number of characters read (not including
|
||||
+ the null terminator), or -1 on error or EOF. */
|
||||
+
|
||||
+ssize_t
|
||||
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
|
||||
+{
|
||||
+ ssize_t result;
|
||||
+ size_t cur_len = 0;
|
||||
+
|
||||
+ if (lineptr == NULL || n == NULL || fp == NULL)
|
||||
+ {
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ flockfile (fp);
|
||||
+
|
||||
+ if (*lineptr == NULL || *n == 0)
|
||||
+ {
|
||||
+ char *new_lineptr;
|
||||
+ *n = 120;
|
||||
+ new_lineptr = (char *) realloc (*lineptr, *n);
|
||||
+ if (new_lineptr == NULL)
|
||||
+ {
|
||||
+ result = -1;
|
||||
+ goto unlock_return;
|
||||
+ }
|
||||
+ *lineptr = new_lineptr;
|
||||
+ }
|
||||
+
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ int i;
|
||||
+
|
||||
+ i = getc_maybe_unlocked (fp);
|
||||
+ if (i == EOF)
|
||||
+ {
|
||||
+ result = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Make enough space for len+1 (for final NUL) bytes. */
|
||||
+ if (cur_len + 1 >= *n)
|
||||
+ {
|
||||
+ size_t needed_max =
|
||||
+ SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
|
||||
+ size_t needed = 2 * *n + 1; /* Be generous. */
|
||||
+ char *new_lineptr;
|
||||
+
|
||||
+ if (needed_max < needed)
|
||||
+ needed = needed_max;
|
||||
+ if (cur_len + 1 >= needed)
|
||||
+ {
|
||||
+ result = -1;
|
||||
+ errno = EOVERFLOW;
|
||||
+ goto unlock_return;
|
||||
+ }
|
||||
+
|
||||
+ new_lineptr = (char *) realloc (*lineptr, needed);
|
||||
+ if (new_lineptr == NULL)
|
||||
+ {
|
||||
+ result = -1;
|
||||
+ goto unlock_return;
|
||||
+ }
|
||||
+
|
||||
+ *lineptr = new_lineptr;
|
||||
+ *n = needed;
|
||||
+ }
|
||||
+
|
||||
+ (*lineptr)[cur_len] = i;
|
||||
+ cur_len++;
|
||||
+
|
||||
+ if (i == delimiter)
|
||||
+ break;
|
||||
+ }
|
||||
+ (*lineptr)[cur_len] = '\0';
|
||||
+ result = cur_len ? cur_len : result;
|
||||
+
|
||||
+ unlock_return:
|
||||
+ funlockfile (fp); /* doesn't set errno */
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
--- gss/src/gl/Makefile.am.orig 2014-07-18 12:34:22.004800000 +0400
|
||||
+++ gss/src/gl/Makefile.am 2014-07-18 12:34:54.328000000 +0400
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
## begin gnulib module gettext-h
|
||||
|
||||
-libgnu_la_SOURCES += gettext.h
|
||||
+libgnu_la_SOURCES += gettext.h getline.c getdelim.c
|
||||
|
||||
## end gnulib module gettext-h
|
||||
|
||||
58
mingw-w64-gss-git/PKGBUILD
Normal file
58
mingw-w64-gss-git/PKGBUILD
Normal file
@@ -0,0 +1,58 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=gss
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=r1479.6fdb450
|
||||
pkgrel=1
|
||||
pkgdesc="GNU Generic Security Service (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.gnu.org/software/gss/"
|
||||
license=("GPL")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git" "wget" "texinfo")
|
||||
options=('strip' 'staticlibs')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-shishi")
|
||||
source=("${_realname}"::"git+git://git.sv.gnu.org/gss.git"
|
||||
001-autoconf.patch
|
||||
002-gnulib.patch)
|
||||
md5sums=('SKIP'
|
||||
'c1992b9d05bf29af92d44b84b5b80189'
|
||||
'4984e4ef1bc87635b9d71cd96b8a3737')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$_realname"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}
|
||||
patch -p1 -i ${srcdir}/001-autoconf.patch
|
||||
patch -p1 -i ${srcdir}/002-gnulib.patch
|
||||
touch doc/Makefile.gdoc
|
||||
rm -f aclocal.m4
|
||||
cp -rf build-aux/snippet ${srcdir}/
|
||||
WANT_AUTOMAKE=latest autoreconf -fi
|
||||
cp -rf ${srcdir}/snippet build-aux/
|
||||
cd ..
|
||||
|
||||
cp -rf ${_realname} build-${MINGW_CHOST}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd build-${MINGW_CHOST}
|
||||
./configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--enable-shared \
|
||||
--enable-static
|
||||
make update-po
|
||||
make -j1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd build-${MINGW_CHOST}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
Reference in New Issue
Block a user