diff --git a/lang/yapsnmp/Makefile b/lang/yapsnmp/Makefile index 12317ceeb..b0a290f77 100644 --- a/lang/yapsnmp/Makefile +++ b/lang/yapsnmp/Makefile @@ -17,7 +17,8 @@ PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365 PKG_BUILD_DEPENDS:=python -PKG_FIXUP = libtool +PKG_FIXUP:=libtool +PKG_REMOVE_FILES:=aclocal.m4 acinclude.m4 include $(INCLUDE_DIR)/package.mk $(call include_mk, python-package.mk) diff --git a/lang/yapsnmp/patches/000-compile_fix.patch b/lang/yapsnmp/patches/000-compile_fix.patch index f98de4919..6d94f05d8 100644 --- a/lang/yapsnmp/patches/000-compile_fix.patch +++ b/lang/yapsnmp/patches/000-compile_fix.patch @@ -1,6 +1,32 @@ ---- yapsnmp-0.7.8/configure 2004-03-08 05:21:26.000000000 -0600 -+++ yapsnmp-0.7.8.new/configure 2007-07-19 15:19:03.712465556 -0500 -@@ -9291,7 +9291,7 @@ +--- a/configure ++++ b/configure +@@ -8757,13 +8757,13 @@ _ACEOF + fi + + +-echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5 +-echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6 ++echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5 ++echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6 + if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lsnmp $LIBS" ++LIBS="-lnetsnmp $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -8816,7 +8816,7 @@ if test $ac_cv_lib_snmp_init_snmp = yes; + #define HAVE_LIBSNMP 1 + _ACEOF + +- LIBS="-lsnmp $LIBS" ++ LIBS="-lnetsnmp $LIBS" + + else + { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5 +@@ -9291,7 +9291,7 @@ fi done @@ -9,8 +35,8 @@ do as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then ---- yapsnmp-0.7.8/src/mib.h-patch 2004-03-07 17:09:53.000000000 -0600 -+++ yapsnmp-0.7.8.new/src/mib.h-patch 2007-07-19 15:12:46.266956163 -0500 +--- a/src/mib.h-patch ++++ b/src/mib.h-patch @@ -1,36 +1,11 @@ -*** /usr/include/net-snmp/library/mib.h 2003-11-11 08:37:02.000000000 -0800 ---- mib.h 2004-03-07 14:59:47.000000000 -0800 @@ -59,8 +85,8 @@ + + char *snmp_out_toggle_options(char *); + void snmp_out_toggle_options_usage(const char *, FILE *); ---- yapsnmp-0.7.8/src/snmp_api.h-patch 2004-03-07 17:09:53.000000000 -0600 -+++ yapsnmp-0.7.8.new/src/snmp_api.h-patch 2007-07-19 14:59:23.653217810 -0500 +--- a/src/snmp_api.h-patch ++++ b/src/snmp_api.h-patch @@ -1,147 +1,100 @@ -*** /usr/include/net-snmp/library/snmp_api.h 2003-11-11 08:37:07.000000000 -0800 ---- snmp_api.h 2004-03-07 15:02:18.000000000 -0800 @@ -306,33 +332,3 @@ + + /* + * use return value from snmp_sess_open as void * parameter ---- yapsnmp-0.7.8/configure.old 2007-07-19 16:27:36.126818690 -0500 -+++ yapsnmp-0.7.8/configure 2007-07-19 16:28:12.692902474 -0500 -@@ -8816,7 +8816,7 @@ - #define HAVE_LIBSNMP 1 - _ACEOF - -- LIBS="-lsnmp $LIBS" -+ LIBS="-lnetsnmp $LIBS" - - else - { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5 ---- yapsnmp-0.7.8/configure.old 2007-07-19 16:30:48.185763508 -0500 -+++ yapsnmp-0.7.8/configure 2007-07-19 16:30:52.021982121 -0500 -@@ -8757,13 +8757,13 @@ - fi - - --echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5 --echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5 -+echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6 - if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lsnmp $LIBS" -+LIBS="-lnetsnmp $LIBS" - cat >conftest.$ac_ext <<_ACEOF - #line $LINENO "configure" - /* confdefs.h. */ diff --git a/lang/yapsnmp/patches/001-automake-compat.patch b/lang/yapsnmp/patches/001-automake-compat.patch new file mode 100644 index 000000000..f738190a1 --- /dev/null +++ b/lang/yapsnmp/patches/001-automake-compat.patch @@ -0,0 +1,46 @@ +--- a/configure.in ++++ b/configure.in +@@ -15,7 +15,7 @@ dnl Checks for libraries. + AC_CHECK_LIB(kstat, kstat_open) + AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(crypto, HMAC) +-AC_CHECK_LIB(snmp, init_snmp, , AC_MSG_ERROR(Couldn't find libsnmp)) ++AC_CHECK_LIB(netsnmp, init_snmp, , AC_MSG_ERROR(Couldn't find libsnmp)) + + dnl Checks for header files. + AC_HEADER_STDC +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -19,10 +19,10 @@ moduledir = $(SITEPACKAGE) + module_DATA = yapsnmp.py $(module).py + + lib_LTLIBRARIES = netsnmpc.la +-netsnmpc_la_SOURCES = $(prodname)_wrap.c ++netsnmpc_la_SOURCES = net-snmp_wrap.c + netsnmpc_la_LDFLAGS = -module -avoid-version + +-$(module).py $(prodname)_wrap.c: $(prodname).i $(includefiles) ++$(module).py net-snmp_wrap.c: $(prodname).i $(includefiles) + $(SWIG) -python -shadow -I$(snmpinclude) $(prodname).i + + $(includefiles): $(patchfiles) +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -101,7 +101,7 @@ patchfiles = snmp_api.h-patch snmp_clien + EXTRA_DIST = yapsnmp.py $(prodname).i $(module).py $(patchfiles) + + CLEANFILES = $(includefiles) +-MAINTAINERCLEANFILES = $(module).py $(prodname)_wrap.c $(prodname)_wrap.doc Makefile.in ++MAINTAINERCLEANFILES = $(module).py net-snmp_wrap.c $(prodname)_wrap.doc Makefile.in + + INCLUDES = -I$(oldincludedir)/$(PYTHONINCPATH) -I$(includedir)/$(PYTHONINCPATH) + +@@ -109,7 +109,7 @@ moduledir = $(SITEPACKAGE) + module_DATA = yapsnmp.py $(module).py + + lib_LTLIBRARIES = netsnmpc.la +-netsnmpc_la_SOURCES = $(prodname)_wrap.c ++netsnmpc_la_SOURCES = net-snmp_wrap.c + netsnmpc_la_LDFLAGS = -module -avoid-version + subdir = src + mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs