1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

Upgrade to 2.0.

PR:		ports/125204
Submitted by:	maintainer
This commit is contained in:
Vanilla I. Shu 2008-07-03 08:52:50 +00:00
parent c94c3ae2a0
commit 63a11134f0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=216223
5 changed files with 102 additions and 18 deletions

View File

@ -6,15 +6,18 @@
#
PORTNAME= libopkele
PORTVERSION= 0.3.2
PORTVERSION= 2.0
CATEGORIES= devel
MASTER_SITES= http://kin.klever.net/dist/
MAINTAINER= zhoushuqun@gmail.com
COMMENT= A c++ implementation of an OpenID decentralized identity system
BUILD_DEPENDS= ${LOCALBASE}/include/boost/shared_ptr.hpp:${PORTSDIR}/devel/boost
LIB_DEPENDS= curl.4:${PORTSDIR}/ftp/curl \
pcre.0:${PORTSDIR}/devel/pcre
pcre.0:${PORTSDIR}/devel/pcre \
tidy:${PORTSDIR}/www/tidy-lib \
xslt:${PORTSDIR}/textproc/libxslt
USE_GMAKE= yes
USE_OPENSSL= yes
@ -22,13 +25,32 @@ USE_LDCONFIG= yes
USE_GNOME= pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ENV= "OPENSSL_CFLAGS=${CFLAGS} -l${OPENSSLINC}" \
OPENSSL_LIBS=-L${OPENSSLLIB}
OPENSSL_LIBS=-L${OPENSSLLIB} \
CPPFLAGS=-I${LOCALBASE}/include
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS= "-L${LOCALBASE}/lib"
# Required version of OpenSSL for this build
OPENSSL_SHLIBVER=5
# If we use the base OpenSSL either by default or
# by design, we need to remove the openssl dependency
# in pkgconfig/libopkele.pc. For the moment, the only
# way I kan think of is to check for 7.0 with OpenSSL 0.9.8b
# and not WITH_OPENSSL_PORT. As 6 requires the port, add this
# as a dependency instead.
.include <bsd.port.pre.mk>
.if ( ${OSVERSION} < 700019 )
WITH_OPENSSL_PORT=yes
.endif
post-patch:
@ ${REINPLACE_CMD} -e "s|pkgconfigdir =.*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|g" \
${WRKSRC}/Makefile.in
.if !defined(WITH_OPENSSL_PORT)
@ ${REINPLACE_CMD} -e "s|Requires: openssl|Requires:|" ${WRKSRC}/libopkele.pc.in
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (libopkele-0.3.2.tar.gz) = 26dbbbaacb09d7df4e11f259ec9693d5
SHA256 (libopkele-0.3.2.tar.gz) = 8b59b81d12f6e29367cc706b3417467ad7a8d3c7fb411be2a973be3324ce78d1
SIZE (libopkele-0.3.2.tar.gz) = 359729
MD5 (libopkele-2.0.tar.gz) = 86cf5bdbdd1a129df1c947090f81adb4
SHA256 (libopkele-2.0.tar.gz) = b89bbf1ddd08e69659cfc618278e22304c9e3e904f9d753e11fdaee868dc8485
SIZE (libopkele-2.0.tar.gz) = 407509

View File

@ -0,0 +1,64 @@
From 12837594b705ad10fdadfd0ba1bfc2249b3b1264 Mon Sep 17 00:00:00 2001
From: Michael Krelin <hacker@klever.net>
Date: Sun, 29 Jun 2008 16:08:01 +0000
Subject: Fixed w3c to unix timestamp conversion for FreeBSD
Thanks to Göran Löwkrantz for pointing both to the problem and possible
solution.
Signed-off-by: Michael Krelin <hacker@klever.net>
---
diff --git a/configure.ac b/configure.ac
index 3194718..3484146 100644
--- configure.ac
+++ configure.ac
@@ -10,6 +10,7 @@ AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
AC_HEADER_STDC
+AC_CHECK_FUNCS([timegm])
AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
diff --git a/lib/util.cc b/lib/util.cc
index d979502..a46ba2a 100644
--- lib/util.cc
+++ lib/util.cc
@@ -122,6 +122,21 @@ namespace opkele {
return rv;
}
+#ifndef HAVE_TIMEGM
+ static time_t timegm(struct tm *t) {
+ char *tz = getenv("TZ");
+ setenv("TZ","",1); tzset();
+ time_t rv = mktime(t);
+ if(tz)
+ setenv("TZ",tz,1);
+ else
+ unsetenv("TZ");
+ tzset();
+ return rv;
+ }
+# define timegm opkele::util::timegm
+#endif /* HAVE_TIMEGM */
+
time_t w3c_to_time(const string& w) {
int fraction;
struct tm tm_t;
@@ -145,10 +160,10 @@ namespace opkele {
throw failed_conversion(OPKELE_CP_ "failed to sscanf()");
tm_t.tm_mon--;
tm_t.tm_year-=1900;
- time_t rv = mktime(&tm_t);
+ time_t rv = timegm(&tm_t);
if(rv==(time_t)-1)
- throw failed_conversion(OPKELE_CP_ "failed to mktime()");
- return rv-timezone;
+ throw failed_conversion(OPKELE_CP_ "failed to gmtime()");
+ return rv;
}
/*
--
cgit v0.7.1-118-g42ef

View File

@ -1,10 +0,0 @@
--- test/Makefile.am.orgi 2008-01-13 18:11:54.000000000 +0100
+++ test/Makefile.am 2008-01-13 18:12:43.000000000 +0100
@@ -1,6 +1,6 @@
noinst_PROGRAMS = test
-INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS}
+INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS} ${LIBCURL_CPPFLAGS}
test_SOURCES = test.cc
test_LDADD = ${top_builddir}/lib/libopkele.la

View File

@ -1,18 +1,26 @@
include/opkele/acconfig.h
include/opkele/association.h
include/opkele/basic_op.h
include/opkele/basic_rp.h
include/opkele/consumer.h
include/opkele/exception.h
include/opkele/extension.h
include/opkele/extension_chain.h
include/opkele/iterator.h
include/opkele/opkele-config.h
include/opkele/prequeue_rp.h
include/opkele/server.h
include/opkele/sreg.h
include/opkele/tr1-mem.h
include/opkele/types.h
include/opkele/uris.h
include/opkele/util.h
include/opkele/verify_op.h
include/opkele/xconsumer.h
include/opkele/xserver.h
lib/libopkele.a
lib/libopkele.la
lib/libopkele.so
lib/libopkele.so.2
lib/libopkele.so.3
libdata/pkgconfig/libopkele.pc
@dirrm include/opkele