View | Details | Raw Unified | Return to bug 125204
Collapse All | Expand All

(-)libopkele/Makefile (-4 / +26 lines)
Lines 6-20 Link Here
6
#
6
#
7
7
8
PORTNAME=	libopkele
8
PORTNAME=	libopkele
9
PORTVERSION=	0.3.2
9
PORTVERSION=	2.0
10
CATEGORIES=	devel
10
CATEGORIES=	devel
11
MASTER_SITES=	http://kin.klever.net/dist/
11
MASTER_SITES=	http://kin.klever.net/dist/
12
12
13
MAINTAINER=	zhoushuqun@gmail.com
13
MAINTAINER=	zhoushuqun@gmail.com
14
COMMENT=	A c++ implementation of an OpenID decentralized identity system
14
COMMENT=	A c++ implementation of an OpenID decentralized identity system
15
15
16
BUILD_DEPENDS=	${LOCALBASE}/include/boost/shared_ptr.hpp:${PORTSDIR}/devel/boost
16
LIB_DEPENDS=	curl.4:${PORTSDIR}/ftp/curl \
17
LIB_DEPENDS=	curl.4:${PORTSDIR}/ftp/curl \
17
		pcre.0:${PORTSDIR}/devel/pcre
18
		pcre.0:${PORTSDIR}/devel/pcre \
19
		tidy:${PORTSDIR}/www/tidy-lib \
20
		xslt:${PORTSDIR}/textproc/libxslt
18
21
19
USE_GMAKE=	yes
22
USE_GMAKE=	yes
20
USE_OPENSSL=	yes
23
USE_OPENSSL=	yes
Lines 22-34 Link Here
22
USE_GNOME=	pkgconfig
25
USE_GNOME=	pkgconfig
23
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
24
CONFIGURE_ENV=	"OPENSSL_CFLAGS=${CFLAGS} -l${OPENSSLINC}" \
27
CONFIGURE_ENV=	"OPENSSL_CFLAGS=${CFLAGS} -l${OPENSSLINC}" \
25
		OPENSSL_LIBS=-L${OPENSSLLIB}
28
		OPENSSL_LIBS=-L${OPENSSLLIB} \
29
		CPPFLAGS=-I${LOCALBASE}/include
26
30
27
CFLAGS+=	-I${LOCALBASE}/include
31
CFLAGS+=	-I${LOCALBASE}/include
28
LDFLAGS=	"-L${LOCALBASE}/lib"
32
LDFLAGS=	"-L${LOCALBASE}/lib"
29
33
34
# Required version of OpenSSL for this build
35
OPENSSL_SHLIBVER=5
36
# If we use the base OpenSSL either by default or 
37
# by design, we need to remove the openssl dependency 
38
# in pkgconfig/libopkele.pc. For the moment, the only
39
# way I kan think of is to check for 7.0 with OpenSSL 0.9.8b
40
# and not WITH_OPENSSL_PORT. As 6 requires the port, add this
41
# as a dependency instead.
42
43
.include <bsd.port.pre.mk>
44
45
.if ( ${OSVERSION} < 700019 )
46
    WITH_OPENSSL_PORT=yes
47
.endif
48
30
post-patch:
49
post-patch:
31
	@ ${REINPLACE_CMD} -e "s|pkgconfigdir =.*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|g" \
50
	@ ${REINPLACE_CMD} -e "s|pkgconfigdir =.*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|g" \
32
	    ${WRKSRC}/Makefile.in
51
	    ${WRKSRC}/Makefile.in
52
.if !defined(WITH_OPENSSL_PORT)
53
	@ ${REINPLACE_CMD} -e "s|Requires: openssl|Requires:|" ${WRKSRC}/libopkele.pc.in
54
.endif
33
55
34
.include <bsd.port.mk>
56
.include <bsd.port.post.mk>
(-)libopkele/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (libopkele-0.3.2.tar.gz) = 26dbbbaacb09d7df4e11f259ec9693d5
1
MD5 (libopkele-2.0.tar.gz) = 86cf5bdbdd1a129df1c947090f81adb4
2
SHA256 (libopkele-0.3.2.tar.gz) = 8b59b81d12f6e29367cc706b3417467ad7a8d3c7fb411be2a973be3324ce78d1
2
SHA256 (libopkele-2.0.tar.gz) = b89bbf1ddd08e69659cfc618278e22304c9e3e904f9d753e11fdaee868dc8485
3
SIZE (libopkele-0.3.2.tar.gz) = 359729
3
SIZE (libopkele-2.0.tar.gz) = 407509
(-)libopkele/files/patch-lib-util.cc (+64 lines)
Line 0 Link Here
1
From 12837594b705ad10fdadfd0ba1bfc2249b3b1264 Mon Sep 17 00:00:00 2001
2
From: Michael Krelin <hacker@klever.net>
3
Date: Sun, 29  Jun  2008  16:08:01  +0000
4
Subject: Fixed w3c to unix timestamp conversion for FreeBSD
5
6
Thanks to Göran Löwkrantz for pointing both to the problem and possible
7
solution.
8
9
Signed-off-by: Michael Krelin <hacker@klever.net>
10
---
11
diff --git a/configure.ac b/configure.ac
12
index 3194718..3484146 100644
13
--- configure.ac
14
+++ configure.ac
15
@@ -10,6 +10,7 @@ AC_PROG_LIBTOOL
16
 PKG_PROG_PKG_CONFIG
17
 
18
 AC_HEADER_STDC
19
+AC_CHECK_FUNCS([timegm])
20
 
21
 AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
22
 
23
diff --git a/lib/util.cc b/lib/util.cc
24
index d979502..a46ba2a 100644
25
--- lib/util.cc
26
+++ lib/util.cc
27
@@ -122,6 +122,21 @@ namespace opkele {
28
 	    return rv;
29
 	}
30
 
31
+#ifndef HAVE_TIMEGM
32
+	static time_t timegm(struct tm *t) {
33
+	    char *tz = getenv("TZ");
34
+	    setenv("TZ","",1); tzset();
35
+	    time_t rv = mktime(t);
36
+	    if(tz)
37
+		setenv("TZ",tz,1);
38
+	    else
39
+		unsetenv("TZ");
40
+	    tzset();
41
+	    return rv;
42
+	}
43
+#	define timegm opkele::util::timegm
44
+#endif /* HAVE_TIMEGM */
45
+
46
 	time_t w3c_to_time(const string& w) {
47
 	    int fraction;
48
 	    struct tm tm_t;
49
@@ -145,10 +160,10 @@ namespace opkele {
50
 		throw failed_conversion(OPKELE_CP_ "failed to sscanf()");
51
 	    tm_t.tm_mon--;
52
 	    tm_t.tm_year-=1900;
53
-	    time_t rv = mktime(&tm_t);
54
+	    time_t rv = timegm(&tm_t);
55
 	    if(rv==(time_t)-1)
56
-		throw failed_conversion(OPKELE_CP_ "failed to mktime()");
57
-	    return rv-timezone;
58
+		throw failed_conversion(OPKELE_CP_ "failed to gmtime()");
59
+	    return rv;
60
 	}
61
 
62
 	/*
63
--
64
cgit v0.7.1-118-g42ef
(-)libopkele/files/patch-test_Makefile.am (-10 lines)
Lines 1-10 Link Here
1
--- test/Makefile.am.orgi	2008-01-13 18:11:54.000000000 +0100
2
+++ test/Makefile.am	2008-01-13 18:12:43.000000000 +0100
3
@@ -1,6 +1,6 @@
4
 noinst_PROGRAMS = test
5
 
6
-INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS}
7
+INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS} ${LIBCURL_CPPFLAGS}
8
 
9
 test_SOURCES = test.cc
10
 test_LDADD = ${top_builddir}/lib/libopkele.la
(-)libopkele/pkg-plist (-2 / +11 lines)
Lines 1-18 Link Here
1
include/opkele/acconfig.h
1
include/opkele/acconfig.h
2
include/opkele/association.h
2
include/opkele/association.h
3
include/opkele/basic_op.h
4
include/opkele/basic_rp.h
3
include/opkele/consumer.h
5
include/opkele/consumer.h
4
include/opkele/exception.h
6
include/opkele/exception.h
5
include/opkele/extension.h
7
include/opkele/extension.h
6
include/opkele/extension_chain.h
8
include/opkele/extension_chain.h
9
include/opkele/iterator.h
7
include/opkele/opkele-config.h
10
include/opkele/opkele-config.h
11
include/opkele/prequeue_rp.h
8
include/opkele/server.h
12
include/opkele/server.h
9
include/opkele/sreg.h
13
include/opkele/sreg.h
14
include/opkele/tr1-mem.h
10
include/opkele/types.h
15
include/opkele/types.h
16
include/opkele/uris.h
17
include/opkele/util.h
18
include/opkele/verify_op.h
11
include/opkele/xconsumer.h
19
include/opkele/xconsumer.h
12
include/opkele/xserver.h
20
include/opkele/xserver.h
13
lib/libopkele.a
21
lib/libopkele.a
14
lib/libopkele.la
22
lib/libopkele.la
15
lib/libopkele.so
23
lib/libopkele.so
16
lib/libopkele.so.2
24
lib/libopkele.so.3
17
libdata/pkgconfig/libopkele.pc
25
lib/pkgconfig/libopkele.pc
26
@dirrm lib/pkgconfig
18
@dirrm include/opkele
27
@dirrm include/opkele

Return to bug 125204