Date: Thu, 3 Jul 2008 04:20:53 GMT From: Sutra Zhou <zhoushuqun@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/125204: devel/libopkele upgrades to 2.0 Message-ID: <200807030420.m634Krnn010407@www.freebsd.org> Resent-Message-ID: <200807030430.m634U1q8032379@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125204 >Category: ports >Synopsis: devel/libopkele upgrades to 2.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jul 03 04:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Sutra Zhou >Release: 7.0-RELEASE >Organization: >Environment: FreeBSD www.redv.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat Jun 28 22:40:44 CST 2008 sutra@www.redv.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: devel/libopkele upgrades to 2.0, thanks to Goran Lowkrantz who provided this patch. >How-To-Repeat: >Fix: The patch is attached and file files/patch-test_Makefile.am is deleted. Patch attached with submission follows: diff -ruN libopkele.bak/Makefile libopkele/Makefile --- libopkele.bak/Makefile 2008-01-14 19:28:47.000000000 +0800 +++ libopkele/Makefile 2008-07-02 02:18:16.000000000 +0800 @@ -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_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> diff -ruN libopkele.bak/distinfo libopkele/distinfo --- libopkele.bak/distinfo 2008-01-14 19:28:47.000000000 +0800 +++ libopkele/distinfo 2008-07-02 01:38:10.000000000 +0800 @@ -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 diff -ruN libopkele.bak/files/patch-lib-util.cc libopkele/files/patch-lib-util.cc --- libopkele.bak/files/patch-lib-util.cc 1970-01-01 08:00:00.000000000 +0800 +++ libopkele/files/patch-lib-util.cc 2008-07-02 01:38:10.000000000 +0800 @@ -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 diff -ruN libopkele.bak/files/patch-test_Makefile.am libopkele/files/patch-test_Makefile.am --- libopkele.bak/files/patch-test_Makefile.am 2008-01-14 19:28:47.000000000 +0800 +++ libopkele/files/patch-test_Makefile.am 1970-01-01 08:00:00.000000000 +0800 @@ -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 diff -ruN libopkele.bak/pkg-plist libopkele/pkg-plist --- libopkele.bak/pkg-plist 2008-01-14 19:28:47.000000000 +0800 +++ libopkele/pkg-plist 2008-07-03 11:32:58.000000000 +0800 @@ -1,18 +1,27 @@ 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 -libdata/pkgconfig/libopkele.pc +lib/libopkele.so.3 +lib/pkgconfig/libopkele.pc +@dirrm lib/pkgconfig @dirrm include/opkele >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807030420.m634Krnn010407>