Browse Source

upgrading package: mapson 3.0 -> 3.3

master
parent
commit
3aadf4fa22
  1. 320
      mapson/mapson.patch
  2. 18
      mapson/mapson.spec
  3. 26
      mapson/setenv.c
  4. 4
      mapson/setenv.h
  5. 32
      mapson/unsetenv.c
  6. 4
      mapson/unsetenv.h

320
mapson/mapson.patch

@ -1,320 +0,0 @@
Index: libhashcash/hashcash.h
--- libhashcash/hashcash.h.orig 2004-04-05 12:52:56.000000000 +0200
+++ libhashcash/hashcash.h 2004-04-05 12:53:18.000000000 +0200
@@ -130,7 +130,7 @@
/* simple function calling hashcash_parse, hashcash_count for convenience */
int hashcash_check( const char* token, const char* resource, time_t now_time,
- time_t validity_period, long grace_period,
+ time_t validity_period, time_t grace_period,
int required_bits );
/* return how many tries per second the machine can do */
Index: configure.ac
--- configure.ac.orig 2004-06-21 23:16:35.000000000 +0200
+++ configure.ac 2004-06-30 16:18:22.983805330 +0200
@@ -33,6 +33,24 @@
AC_LIBOBJ(libgetopt/getopt1)
fi
+dnl If the system is missing setenv(3), then use
+dnl the version included in this distribution instead.
+dnl
+AC_CHECK_FUNC(setenv, have_setenv=yes, have_setenv=no)
+if test "x$have_setenv" != "xyes" -o "x$have_setenv" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -Ilibsetenv"
+ AC_LIBOBJ(libsetenv/setenv)
+fi
+
+dnl If the system is missing unsetenv(3), then use
+dnl the version included in this distribution instead.
+dnl
+AC_CHECK_FUNC(unsetenv, have_unsetenv=yes, have_unsetenv=no)
+if test "x$have_unsetenv" != "xyes" -o "x$have_unsetenv" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -Ilibunsetenv"
+ AC_LIBOBJ(libunsetenv/unsetenv)
+fi
+
dnl Perform some incredibly experimental magic to guess installation
dnl paths in an unexpectedly clever way. Henceforth evaluate the paths
dnl right away so that we can guarantee _absolute_ paths for our
Index: configure
--- configure.orig 2004-06-30 16:26:59.696796000 +0200
+++ configure 2004-06-30 16:27:15.198222529 +0200
@@ -3537,6 +3537,222 @@
fi
+echo "$as_me:$LINENO: checking for setenv" >&5
+echo $ECHO_N "checking for setenv... $ECHO_C" >&6
+if test "${ac_cv_func_setenv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setenv to an innocuous variant, in case <limits.h> declares setenv.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setenv innocuous_setenv
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setenv (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setenv
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setenv ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setenv) || defined (__stub___setenv)
+choke me
+#else
+char (*f) () = setenv;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setenv;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setenv=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setenv" >&5
+echo "${ECHO_T}$ac_cv_func_setenv" >&6
+if test $ac_cv_func_setenv = yes; then
+ have_setenv=yes
+else
+ have_setenv=no
+fi
+
+if test "x$have_setenv" != "xyes" -o "x$have_setenv" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -Ilibsetenv"
+ case $LIBOBJS in
+ "libsetenv/setenv.$ac_objext" | \
+ *" libsetenv/setenv.$ac_objext" | \
+ "libsetenv/setenv.$ac_objext "* | \
+ *" libsetenv/setenv.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS libsetenv/setenv.$ac_objext" ;;
+esac
+
+fi
+
+echo "$as_me:$LINENO: checking for unsetenv" >&5
+echo $ECHO_N "checking for unsetenv... $ECHO_C" >&6
+if test "${ac_cv_func_unsetenv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define unsetenv to an innocuous variant, in case <limits.h> declares unsetenv.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define unsetenv innocuous_unsetenv
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char unsetenv (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef unsetenv
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char unsetenv ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_unsetenv) || defined (__stub___unsetenv)
+choke me
+#else
+char (*f) () = unsetenv;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != unsetenv;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_unsetenv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_unsetenv=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_unsetenv" >&5
+echo "${ECHO_T}$ac_cv_func_unsetenv" >&6
+if test $ac_cv_func_unsetenv = yes; then
+ have_unsetenv=yes
+else
+ have_unsetenv=no
+fi
+
+if test "x$have_unsetenv" != "xyes" -o "x$have_unsetenv" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -Ilibunsetenv"
+ case $LIBOBJS in
+ "libunsetenv/unsetenv.$ac_objext" | \
+ *" libunsetenv/unsetenv.$ac_objext" | \
+ "libunsetenv/unsetenv.$ac_objext "* | \
+ *" libunsetenv/unsetenv.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS libunsetenv/unsetenv.$ac_objext" ;;
+esac
+
+fi
+
if test "$prefix" = "NONE"; then
prefix=/usr/local
if test "$exec_prefix" = "NONE"; then
Index: Makefile.in
--- Makefile.in.orig 2004-06-21 23:18:16.000000000 +0200
+++ Makefile.in 2004-06-30 16:55:48.072234546 +0200
@@ -48,7 +48,7 @@
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/configure COPYING ChangeLog INSTALL TODO compile \
depcomp install-sh libgetopt/getopt.c libgetopt/getopt1.c \
- missing
+ libsetenv/setenv.c libunsetenv/unsetenv.c missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -79,6 +79,8 @@
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/libgetopt/getopt.Po \
@AMDEP_TRUE@ $(DEPDIR)/libgetopt/getopt1.Po \
+@AMDEP_TRUE@ $(DEPDIR)/libsetenv/setenv.Po \
+@AMDEP_TRUE@ $(DEPDIR)/libunsetenv/unsetenv.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mapson-accept-confirmation.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mapson-address-db.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/mapson-config.Po \
@@ -324,6 +326,8 @@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/libgetopt/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/libgetopt/getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/libsetenv/setenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/libunsetenv/unsetenv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapson-accept-confirmation.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapson-address-db.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapson-config.Po@am__quote@
@@ -1039,7 +1043,10 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(DEPDIR)/libgetopt ./$(DEPDIR)
+ -rm -rf $(DEPDIR)/libgetopt
+ -rm -rf $(DEPDIR)/libsetenv
+ -rm -rf $(DEPDIR)/libunsetenv
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1067,7 +1074,10 @@
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf $(DEPDIR)/libgetopt ./$(DEPDIR)
+ -rm -rf $(DEPDIR)/libgetopt
+ -rm -rf $(DEPDIR)/libsetenv
+ -rm -rf $(DEPDIR)/libunsetenv
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

18
mapson/mapson.spec

@ -31,16 +31,11 @@ Distribution: OpenPKG Community
Class: PLUS
Group: Mail
License: GPL
Version: 3.0
Release: 20080101
Version: 3.3
Release: 20100225
# list of sources
Source0: http://switch.dl.sourceforge.net/sourceforge/mapson/mapson-%{version}.tar.gz
Source1: setenv.h
Source2: setenv.c
Source3: unsetenv.h
Source4: unsetenv.c
Patch0: mapson.patch
# build information
Prefix: %{l_prefix}
@ -64,11 +59,6 @@ AutoReqProv: no
%prep
%setup -q
%patch -p0
touch aclocal.m4
mkdir libsetenv libunsetenv
cp %{SOURCE setenv.c} %{SOURCE setenv.h} libsetenv/
cp %{SOURCE unsetenv.c} %{SOURCE unsetenv.h} libunsetenv/
%build
CC="%{l_cc}" \
@ -80,6 +70,8 @@ AutoReqProv: no
LIBS="-lgetopt" \
./configure \
--prefix=%{l_prefix} \
--mandir=%{l_prefix}/man \
--datadir=%{l_prefix}/share/mapson \
--sysconfdir=%{l_prefix}/etc/mapson \
--with-mta=%{l_prefix}/sbin/sendmail
%{l_make} %{l_mflags}
@ -89,6 +81,8 @@ AutoReqProv: no
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/mapson/*-sample
rm -f $RPM_BUILD_ROOT%{l_prefix}/share/mapson/*-sample
rm -f $RPM_BUILD_ROOT%{l_prefix}/include/*
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

26
mapson/setenv.c

@ -1,26 +0,0 @@
#ifndef HAVE_SETENV
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
int setenv(const char *kszName, const char *kszValue, int nOverwrite)
{
char *szPair = NULL;
if (nOverwrite == 0 && getenv(kszName) != 0)
return 0;
szPair = malloc(strlen(kszName) + 1 + strlen(kszValue) + 1);
if (szPair == NULL)
return -1;
strcpy(szPair, kszName);
strcat(szPair, "=");
strcat(szPair, kszValue);
putenv(szPair);
return 0;
}
#endif /* !HAVE_SETENV */

4
mapson/setenv.h

@ -1,4 +0,0 @@
#ifndef LOC_SETENV_H
# define LOC_SETENV_H
int setenv(const char *, const char *, int);
#endif /* not LOC_SETENV_H */

32
mapson/unsetenv.c

@ -1,32 +0,0 @@
#ifndef HAVE_UNSETENV
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
extern char **environ;
void unsetenv(const char *kszName)
{
int nLen;
const char *kszTail;
char **ppEnv;
if (kszName == 0 || environ == 0)
return;
for (kszTail = kszName; *kszTail && *kszTail != '='; kszTail++)
/* noop */;
nLen = kszTail - kszName;
for (ppEnv = environ; *ppEnv != 0; ppEnv++)
if (strncmp(*ppEnv, kszName, nLen) == 0 && (*ppEnv)[nLen] == '=')
break;
while (*ppEnv != 0) {
*ppEnv = *(ppEnv + 1);
ppEnv++;
}
}
#endif /* !HAVE_UNSETENV */

4
mapson/unsetenv.h

@ -1,4 +0,0 @@
#ifndef LOC_UNSETENV_H
# define LOC_UNSETENV_H
void unsetenv(const char *);
#endif /* not LOC_UNSETENV_H */
Loading…
Cancel
Save