pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gcr: Add memrchr for platforms that need it like Darwin and sunos, fix duplicate symbols isue
Module Name: pkgsrc-wip
Committed By: youri <youri%NetBSD.org@localhost>
Pushed By: youri
Date: Wed Apr 13 15:58:56 2016 +0200
Changeset: 08ecc16e1649b3282bd68947c09624f4adfb7943
Modified Files:
gcr/Makefile
gcr/buildlink3.mk
gcr/distinfo
Added Files:
gcr/files/memrchr.c
gcr/patches/patch-configure.ac
gcr/patches/patch-egg_egg-armor.c
gcr/patches/patch-egg_egg-asn1x.h
gcr/patches/patch-gcr_gcr-certificate.h
Log Message:
gcr: Add memrchr for platforms that need it like Darwin and sunos, fix duplicate symbols isue
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=08ecc16e1649b3282bd68947c09624f4adfb7943
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gcr/Makefile | 18 ++++++++++++++-
gcr/buildlink3.mk | 20 -----------------
gcr/distinfo | 4 ++++
gcr/files/memrchr.c | 40 +++++++++++++++++++++++++++++++++
gcr/patches/patch-configure.ac | 15 +++++++++++++
gcr/patches/patch-egg_egg-armor.c | 17 ++++++++++++++
gcr/patches/patch-egg_egg-asn1x.h | 15 +++++++++++++
gcr/patches/patch-gcr_gcr-certificate.h | 15 +++++++++++++
8 files changed, 123 insertions(+), 21 deletions(-)
diffs:
diff --git a/gcr/Makefile b/gcr/Makefile
index d46367f..6221f84 100644
--- a/gcr/Makefile
+++ b/gcr/Makefile
@@ -14,9 +14,25 @@ BUILD_DEPENDS+= gdbus-codegen-[0-9]*:../../devel/gdbus-codegen
GNU_CONFIGURE= YES
USE_PKGLOCALEDIR= YES
-USE_TOOLS+= gmake intltool msgfmt perl pkg-config
+USE_TOOLS+= gmake intltool msgfmt perl pkg-config \
+ aclocal autoconf autoheader automake
+
USE_LIBTOOL= YES
+PKGCONFIG_OVERRIDE+= gck-1.pc.in \
+ gcr-base-3.pc.in \
+ gcr-ui.pc.in \
+ gcr-3.pc.in
+
+post-patch:
+ cp ${FILESDIR}/memrchr.c ${WRKSRC}/egg/
+
+pre-configure:
+ ${RUN} cd ${WRKSRC} && \
+ autoconf && \
+ autoheader && \
+ automake
+
.include "../../security/libgcrypt/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
diff --git a/gcr/buildlink3.mk b/gcr/buildlink3.mk
index fd55293..ce69e44 100644
--- a/gcr/buildlink3.mk
+++ b/gcr/buildlink3.mk
@@ -1,14 +1,4 @@
# $NetBSD$
-# XXX
-# XXX This file was created automatically using createbuildlink-3.17.
-# XXX After this file has been verified as correct, the comment lines
-# XXX beginning with "XXX" should be removed. Please do not commit
-# XXX unverified buildlink3.mk files.
-# XXX
-# XXX Packages that only install static libraries or headers should
-# XXX include the following line:
-# XXX
-# XXX BUILDLINK_DEPMETHOD.gcr?= build
BUILDLINK_TREE+= gcr
@@ -18,17 +8,7 @@ GCR_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.gcr+= gcr>=3.18.0
BUILDLINK_PKGSRCDIR.gcr?= ../../wip/gcr
-# XXX
-# XXX Uncomment and keep only the buildlink3 lines below which are directly
-# XXX needed for dependencies to compile, link, and run. If this package
-# XXX provides a wrappered API or otherwise does not expose the APIs of the
-# XXX buildlink3 lines below to dependencies, remove them.
-# XXX
-#.include "../../security/libgcrypt/buildlink3.mk"
.include "../../wip/p11-kit/buildlink3.mk"
-#.include "../../devel/glib2/buildlink3.mk"
-#.include "../../sysutils/dbus-glib/buildlink3.mk"
-#.include "../../textproc/gnome-doc-utils/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"
.endif # GCR_BUILDLINK3_MK
diff --git a/gcr/distinfo b/gcr/distinfo
index f4597d6..30c7d64 100644
--- a/gcr/distinfo
+++ b/gcr/distinfo
@@ -4,3 +4,7 @@ SHA1 (gcr-3.18.0.tar.xz) = 993ba9263cb4554b8710ab6df6abd0576878f8b3
RMD160 (gcr-3.18.0.tar.xz) = 4a31fc41abd22fcb399c546b13ac1a3bf90dc95d
SHA512 (gcr-3.18.0.tar.xz) = 3733a462c23b0cf1d3579ea4b0b6eea9b5e3eb98e81e7c0e0364e540ec60a7a7bc567d1d159c674df280fb20c305cbaef796dffef73801ece4f4474352786e6b
Size (gcr-3.18.0.tar.xz) = 1311368 bytes
+SHA1 (patch-configure.ac) = 3f09919dc392e00d88555d4949fe920e2daa25a3
+SHA1 (patch-egg_egg-armor.c) = 19f79aad00dbad9f89305d29433d5cd7bbeb3e9e
+SHA1 (patch-egg_egg-asn1x.h) = a172af2a79febc165d9585566068b0975412deb0
+SHA1 (patch-gcr_gcr-certificate.h) = 9935af2169e215d5e7ccdacf398ac35c17bcc179
diff --git a/gcr/files/memrchr.c b/gcr/files/memrchr.c
new file mode 100644
index 0000000..0686e23
--- /dev/null
+++ b/gcr/files/memrchr.c
@@ -0,0 +1,40 @@
+/* $OpenBSD: memrchr.c,v 1.2 2007/11/27 16:22:12 martynas Exp $ */
+
+/*
+ * Copyright (c) 2007 Todd C. Miller <Todd.Miller%courtesan.com@localhost>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+#include <string.h>
+
+/*
+ * Reverse memchr()
+ * Find the last occurrence of 'c' in the buffer 's' of size 'n'.
+ */
+void *
+memrchr(const void *s, int c, size_t n)
+{
+ const unsigned char *cp;
+
+ if (n != 0) {
+ cp = (unsigned char *)s + n;
+ do {
+ if (*(--cp) == (unsigned char)c)
+ return((void *)cp);
+ } while (--n != 0);
+ }
+ return(NULL);
+}
\ No newline at end of file
diff --git a/gcr/patches/patch-configure.ac b/gcr/patches/patch-configure.ac
new file mode 100644
index 0000000..d25665d
--- /dev/null
+++ b/gcr/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Detect memrchr function.
+
+--- configure.ac.orig 2015-09-28 16:08:46.000000000 +0000
++++ configure.ac
+@@ -144,7 +144,7 @@ AM_CONDITIONAL(HAVE_VALAC, test "x$VALAC
+ #
+
+ AC_CHECK_FUNCS(timegm, AC_DEFINE(HAVE_TIMEGM,1,[Have timegm]))
+-AC_CHECK_FUNCS(mlock)
++AC_CHECK_FUNCS(mlock memrchr)
+
+ # --------------------------------------------------------------------
+ # p11-kit
diff --git a/gcr/patches/patch-egg_egg-armor.c b/gcr/patches/patch-egg_egg-armor.c
new file mode 100644
index 0000000..47f3a0e
--- /dev/null
+++ b/gcr/patches/patch-egg_egg-armor.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Include memrchr for platforms that don't have it.
+
+--- egg/egg-armor.c.orig 2014-09-23 07:40:08.000000000 +0000
++++ egg/egg-armor.c
+@@ -33,6 +33,10 @@
+ #include <ctype.h>
+ #include <string.h>
+
++#ifndef HAVE_MEMRCHR
++#include "memrchr.c"
++#endif
++
+ /*
+ * Armor looks like:
+ *
diff --git a/gcr/patches/patch-egg_egg-asn1x.h b/gcr/patches/patch-egg_egg-asn1x.h
new file mode 100644
index 0000000..ae5c70c
--- /dev/null
+++ b/gcr/patches/patch-egg_egg-asn1x.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Avoid duplicate symbols.
+
+--- egg/egg-asn1x.h.orig 2014-09-23 07:40:08.000000000 +0000
++++ egg/egg-asn1x.h
+@@ -67,7 +67,7 @@ typedef enum {
+ EGG_ASN1X_GENERALIZED_TIME = 37,
+ } EggAsn1xType;
+
+-enum {
++extern enum {
+ EGG_ASN1X_NO_STRICT = 0x01,
+ } EggAsn1xFlags;
+
diff --git a/gcr/patches/patch-gcr_gcr-certificate.h b/gcr/patches/patch-gcr_gcr-certificate.h
new file mode 100644
index 0000000..d20e259
--- /dev/null
+++ b/gcr/patches/patch-gcr_gcr-certificate.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Avoid duplicate symbols.
+
+--- gcr/gcr-certificate.h.orig 2014-09-23 07:40:08.000000000 +0000
++++ gcr/gcr-certificate.h
+@@ -149,6 +149,8 @@ void gcr_certificate_mixi
+ GValue *value,
+ GParamSpec *pspec);
+
++enum EggAsn1xFlags;
++
+ G_END_DECLS
+
+ #endif /* __GCR_CERTIFICATE_H__ */
Home |
Main Index |
Thread Index |
Old Index