SF.net SVN: gar:[22245] csw/mgar/pkg
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Fri Oct 18 16:41:42 CEST 2013
Revision: 22245
http://gar.svn.sourceforge.net/gar/?rev=22245&view=rev
Author: dmichelsen
Date: 2013-10-18 14:41:38 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
libmetalink/trunk: Initial commit
Added Paths:
-----------
csw/mgar/pkg/libmetalink/
csw/mgar/pkg/libmetalink/Makefile
csw/mgar/pkg/libmetalink/branches/
csw/mgar/pkg/libmetalink/tags/
csw/mgar/pkg/libmetalink/trunk/
csw/mgar/pkg/libmetalink/trunk/Makefile
csw/mgar/pkg/libmetalink/trunk/checksums
csw/mgar/pkg/libmetalink/trunk/files/
csw/mgar/pkg/libmetalink/trunk/files/0001-Do-not-use-Wall-unconditionally.patch
csw/mgar/pkg/libmetalink/trunk/files/0002-Add-definition-of-INT32_MIN.patch
csw/mgar/pkg/libmetalink/trunk/files/0003-Use-pkgconfig-for-expat-libs.patch
csw/mgar/pkg/libmetalink/trunk/files/0153-bzr-commit-153.patch
csw/mgar/pkg/libmetalink/trunk/files/0154-bzr-commit-154.patch
csw/mgar/pkg/libmetalink/trunk/files/153
csw/mgar/pkg/libmetalink/trunk/files/154
Added: csw/mgar/pkg/libmetalink/Makefile
===================================================================
--- csw/mgar/pkg/libmetalink/Makefile (rev 0)
+++ csw/mgar/pkg/libmetalink/Makefile 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,2 @@
+%:
+ $(MAKE) -C trunk $*
Property changes on: csw/mgar/pkg/libmetalink/trunk
___________________________________________________________________
Added: svn:ignore
+ work
Added: csw/mgar/pkg/libmetalink/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/Makefile 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,43 @@
+# $Id$
+# TODO (release-critical prefixed with !, non release-critical with *)
+#
+NAME = libmetalink
+VERSION = 0.1.2
+GARTYPE = v2
+
+DESCRIPTION = A library to add Metalink functionality
+
+MASTER_SITES = https://launchpad.net/libmetalink/trunk/packagingfix/+download/
+DISTFILES += $(DISTNAME).tar.bz2
+
+# Important bzr revisions after release of 0.1.2 from
+# https://code.launchpad.net/~metalink-dev/libmetalink/trunk
+PATCHFILES += 0153-bzr-commit-153.patch
+PATCHFILES += 0154-bzr-commit-154.patch
+
+# Use patch until this is fixed:
+# https://bugs.launchpad.net/libmetalink/+bug/1241633
+PATCHFILES += 0001-Do-not-use-Wall-unconditionally.patch
+
+# Use patch until this is fixed:
+# https://bugs.launchpad.net/libmetalink/+bug/1241635
+PATCHFILES += 0002-Add-definition-of-INT32_MIN.patch
+
+# Use patch until this is fixed:
+# https://bugs.launchpad.net/libmetalink/+bug/1241639
+PATCHFILES += 0003-Use-pkgconfig-for-expat-libs.patch
+
+PACKAGES += CSWlibmetalink3
+SPKG_DESC_CSWlibmetalink3 = A library to add Metalink functionality, libmetalink.so.3
+PKGFILES_CSWlibmetalink3 += $(call pkgfiles_lib,libmetalink.so.3)
+RUNTIME_DEP_PKGS_CSWlibmetalink3 += CSWlibexpat1
+
+PACKAGES += CSWlibmetalink-dev
+SPKG_DESC_CSWlibmetalink-dev = Development files for libmetalink.so.3
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWlibmetalink-dev += CSWlibmetalink3
+
+BUILD64 = 1
+
+include gar/category.mk
+
Property changes on: csw/mgar/pkg/libmetalink/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: csw/mgar/pkg/libmetalink/trunk/checksums
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/checksums (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/checksums 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1 @@
+e60ea56d910ebfe4c303808db497e92a libmetalink-0.1.2.tar.bz2
Added: csw/mgar/pkg/libmetalink/trunk/files/0001-Do-not-use-Wall-unconditionally.patch
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/0001-Do-not-use-Wall-unconditionally.patch (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/0001-Do-not-use-Wall-unconditionally.patch 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,38 @@
+From c2cf1158df6fc56ad2dca6e9d58bb92be93fad36 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Fri, 18 Oct 2013 15:38:54 +0200
+Subject: [PATCH] Do not use -Wall unconditionally
+
+---
+ doc/examples/Makefile.in | 2 +-
+ lib/Makefile.in | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
+index cd3ba53..bec3757 100644
+--- a/doc/examples/Makefile.in
++++ b/doc/examples/Makefile.in
+@@ -228,7 +228,7 @@ target_vendor = @target_vendor@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes
++AM_CPPFLAGS = -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes
+ LDADD = $(top_builddir)/lib/libmetalink.la
+ metalinkcat_SOURCES = metalinkcat.c
+ EXTRA_DIST = LibO_3.5.4_Win_x86_install_multi.msi.meta4 \
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index c3438eb..1849da7 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -328,7 +328,6 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = includes
+-AM_CFLAGS = -Wall
+ AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes \
+ @XML_CPPFLAGS@ @EXPAT_CFLAGS@ \
+ @DEFS@
+--
+1.8.3.4
+
Added: csw/mgar/pkg/libmetalink/trunk/files/0002-Add-definition-of-INT32_MIN.patch
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/0002-Add-definition-of-INT32_MIN.patch (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/0002-Add-definition-of-INT32_MIN.patch 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,25 @@
+From 5ddb8ae66e212ce2dfcb46a39dea91c0c12ce81d Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Fri, 18 Oct 2013 15:54:24 +0200
+Subject: [PATCH] Add definition of INT32_MIN
+
+---
+ lib/timegm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/timegm.c b/lib/timegm.c
+index dced800..fb4cb88 100644
+--- a/lib/timegm.c
++++ b/lib/timegm.c
+@@ -29,6 +29,8 @@
+
+ #include <stdint.h>
+
++#define INT32_MIN (~ INT32_MAX)
++
+ /* Counter the number of leap year in the range [0, y). The |y| is the
+ year, including century (e.g., 2012) */
+ static int count_leap_year(int y)
+--
+1.8.3.4
+
Added: csw/mgar/pkg/libmetalink/trunk/files/0003-Use-pkgconfig-for-expat-libs.patch
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/0003-Use-pkgconfig-for-expat-libs.patch (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/0003-Use-pkgconfig-for-expat-libs.patch 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,25 @@
+From a97f1c4bf7bc6b1df79d21bd5dc7a1dd765665c5 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Fri, 18 Oct 2013 15:59:00 +0200
+Subject: [PATCH] Use pkgconfig for expat libs
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 7f2dc88..2e8afb8 100755
+--- a/configure
++++ b/configure
+@@ -12079,7 +12079,7 @@ if test "x$have_libexpat" = "xyes"; then
+
+ $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
+
+- EXPAT_LIBS=-lexpat
++ EXPAT_LIBS=`/opt/csw/bin/pkg-config --libs expat`
+ EXPAT_CFLAGS=
+
+
+--
+1.8.3.4
+
Added: csw/mgar/pkg/libmetalink/trunk/files/0153-bzr-commit-153.patch
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/0153-bzr-commit-153.patch (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/0153-bzr-commit-153.patch 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,57 @@
+From b39da20e9b2dc145ba19dfca0a6b951afc71aa52 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Fri, 18 Oct 2013 16:26:52 +0200
+Subject: [PATCH 153/154] bzr commit #153
+
+---
+ lib/metalink_pstm.c | 1 +
+ lib/metalink_session_data.c | 1 +
+ lib/metalink_string_buffer.c | 7 +++++++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/lib/metalink_pstm.c b/lib/metalink_pstm.c
+index 1bcc9c2..efa29e9 100644
+--- a/lib/metalink_pstm.c
++++ b/lib/metalink_pstm.c
+@@ -35,6 +35,7 @@ metalink_pstm_t* new_metalink_pstm(void)
+ if(!stm) {
+ return NULL;
+ }
++ stm->state = NULL;
+ stm->ctrl = new_metalink_pctrl();
+ if(!stm->ctrl) {
+ goto NEW_METALINK_PSTM_ERROR;
+diff --git a/lib/metalink_session_data.c b/lib/metalink_session_data.c
+index 54377f9..6d616c8 100644
+--- a/lib/metalink_session_data.c
++++ b/lib/metalink_session_data.c
+@@ -33,6 +33,7 @@ metalink_session_data_t* metalink_session_data_new(void)
+ if(!sd) {
+ return NULL;
+ }
++ sd->characters_stack = NULL;
+ sd->stm = new_metalink_pstm();
+ if(!sd->stm) {
+ goto NEW_SESSION_DATA_ERROR;
+diff --git a/lib/metalink_string_buffer.c b/lib/metalink_string_buffer.c
+index 114579b..6405ae1 100644
+--- a/lib/metalink_string_buffer.c
++++ b/lib/metalink_string_buffer.c
+@@ -31,7 +31,14 @@
+ metalink_string_buffer_t* metalink_string_buffer_new(size_t initial_capacity)
+ {
+ metalink_string_buffer_t* sbuf = malloc(sizeof(metalink_string_buffer_t));
++ if(!sbuf) {
++ return NULL;
++ }
+ sbuf->buffer = calloc(sizeof(char), initial_capacity+1);
++ if(!sbuf->buffer) {
++ free(sbuf);
++ return NULL;
++ }
+ sbuf->length = 0;
+ sbuf->buffer[sbuf->length] = '\0';
+ sbuf->capacity = initial_capacity;
+--
+1.8.3.4
+
Added: csw/mgar/pkg/libmetalink/trunk/files/0154-bzr-commit-154.patch
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/0154-bzr-commit-154.patch (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/0154-bzr-commit-154.patch 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,38 @@
+From 08e4cb277db7cfb9a6456167d1c3d0200ad16f8f Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Fri, 18 Oct 2013 16:27:37 +0200
+Subject: [PATCH 154/154] bzr commit #154
+
+---
+ configure.ac | 4 +++-
+ doc/examples/metalinkcat.c | 7 +++++--
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/doc/examples/metalinkcat.c b/doc/examples/metalinkcat.c
+index 8bb7c21..081a41e 100644
+--- a/doc/examples/metalinkcat.c
++++ b/doc/examples/metalinkcat.c
+@@ -51,7 +51,9 @@ int main(int argc, char** argv)
+ file = metalink->files[0];
+ printf("name: %s\n", file->name);
+ printf("size: %" PRId64 "\n", (int64_t)file->size);
+- printf("os : %s\n", file->os);
++ if(file->os) {
++ printf("os : %s\n", file->os);
++ }
+
+ if(file->checksums) {
+ checksums = file->checksums;
+@@ -82,7 +84,8 @@ int main(int argc, char** argv)
+ resources = file->resources;
+ while(*resources && count < 5) {
+ printf("type=%s, location=%s, preference=%d, url=%s\n",
+- (*resources)->type, (*resources)->location,
++ (*resources)->type ? (*resources)->type : "<null>",
++ (*resources)->location ? (*resources)->location : "<null>",
+ (*resources)->preference, (*resources)->url);
+ ++resources;
+ ++count;
+--
+1.8.3.4
+
Added: csw/mgar/pkg/libmetalink/trunk/files/153
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/153 (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/153 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,43 @@
+=== modified file 'lib/metalink_pstm.c'
+--- lib/metalink_pstm.c 2012-06-30 10:17:09 +0000
++++ lib/metalink_pstm.c 2013-01-25 14:52:14 +0000
+@@ -35,6 +35,7 @@
+ if(!stm) {
+ return NULL;
+ }
++ stm->state = NULL;
+ stm->ctrl = new_metalink_pctrl();
+ if(!stm->ctrl) {
+ goto NEW_METALINK_PSTM_ERROR;
+
+=== modified file 'lib/metalink_session_data.c'
+--- lib/metalink_session_data.c 2012-06-30 10:17:09 +0000
++++ lib/metalink_session_data.c 2013-01-25 14:52:14 +0000
+@@ -33,6 +33,7 @@
+ if(!sd) {
+ return NULL;
+ }
++ sd->characters_stack = NULL;
+ sd->stm = new_metalink_pstm();
+ if(!sd->stm) {
+ goto NEW_SESSION_DATA_ERROR;
+
+=== modified file 'lib/metalink_string_buffer.c'
+--- lib/metalink_string_buffer.c 2012-06-30 10:17:09 +0000
++++ lib/metalink_string_buffer.c 2013-01-25 14:52:14 +0000
+@@ -31,7 +31,14 @@
+ metalink_string_buffer_t* metalink_string_buffer_new(size_t initial_capacity)
+ {
+ metalink_string_buffer_t* sbuf = malloc(sizeof(metalink_string_buffer_t));
++ if(!sbuf) {
++ return NULL;
++ }
+ sbuf->buffer = calloc(sizeof(char), initial_capacity+1);
++ if(!sbuf->buffer) {
++ free(sbuf);
++ return NULL;
++ }
+ sbuf->length = 0;
+ sbuf->buffer[sbuf->length] = '\0';
+ sbuf->capacity = initial_capacity;
+
Added: csw/mgar/pkg/libmetalink/trunk/files/154
===================================================================
--- csw/mgar/pkg/libmetalink/trunk/files/154 (rev 0)
+++ csw/mgar/pkg/libmetalink/trunk/files/154 2013-10-18 14:41:38 UTC (rev 22245)
@@ -0,0 +1,40 @@
+=== modified file 'configure.ac'
+--- configure.ac 2012-08-29 15:28:07 +0000
++++ configure.ac 2013-01-28 16:17:56 +0000
+@@ -43,7 +43,9 @@
+ ac_cv_func_malloc_0_nonnull=yes
+ ac_cv_func_realloc_0_nonnull=yes
+ ;;
+-
++ *-*solaris*)
++ CFLAGS="-std=gnu99 -D_XOPEN_SOURCE=600 $CFLAGS"
++ ;;
+ *)
+ ;;
+ esac
+
+=== modified file 'doc/examples/metalinkcat.c'
+--- doc/examples/metalinkcat.c 2012-07-02 12:46:19 +0000
++++ doc/examples/metalinkcat.c 2013-01-28 16:17:56 +0000
+@@ -51,7 +51,9 @@
+ file = metalink->files[0];
+ printf("name: %s\n", file->name);
+ printf("size: %" PRId64 "\n", (int64_t)file->size);
+- printf("os : %s\n", file->os);
++ if(file->os) {
++ printf("os : %s\n", file->os);
++ }
+
+ if(file->checksums) {
+ checksums = file->checksums;
+@@ -82,7 +84,8 @@
+ resources = file->resources;
+ while(*resources && count < 5) {
+ printf("type=%s, location=%s, preference=%d, url=%s\n",
+- (*resources)->type, (*resources)->location,
++ (*resources)->type ? (*resources)->type : "<null>",
++ (*resources)->location ? (*resources)->location : "<null>",
+ (*resources)->preference, (*resources)->url);
+ ++resources;
+ ++count;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list