mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] wvdial: Add package
Date: Sat, 30 Sep 2017 13:02:39 +0200	[thread overview]
Message-ID: <20170930110239.az3bg7fhhsiv7zwy@pengutronix.de> (raw)
In-Reply-To: <20170929135202.5817-2-s.hauer@pengutronix.de>

On Fri, Sep 29, 2017 at 03:52:02PM +0200, Sascha Hauer wrote:
> Back in the good old days wvdial was used to easily connect
> a modem to the internet without having to write chat scripts
> manually. Some people still use modems, so add support for
> wvdial to ptxdist.
> 
> The original wvdial uses a homebrew build system not suitable
> for cross compilation, so we replace it with autoconf/automake.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  patches/wvdial-1.61/0001-remove-build-files.patch  | 552 +++++++++++++++++++++
>  .../0002-Add-autoconf-automake-files.patch         | 292 +++++++++++
>  patches/wvdial-1.61/autogen.sh                     |  27 +
>  patches/wvdial-1.61/series                         |   2 +
>  rules/wvdial.in                                    |  32 ++
>  rules/wvdial.make                                  |  69 +++
>  6 files changed, 974 insertions(+)
>  create mode 100644 patches/wvdial-1.61/0001-remove-build-files.patch
>  create mode 100644 patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
>  create mode 100755 patches/wvdial-1.61/autogen.sh
>  create mode 100644 patches/wvdial-1.61/series
>  create mode 100644 rules/wvdial.in
>  create mode 100644 rules/wvdial.make
> 
> diff --git a/patches/wvdial-1.61/0001-remove-build-files.patch b/patches/wvdial-1.61/0001-remove-build-files.patch
> new file mode 100644
> index 000000000..6c561c08e
> --- /dev/null
> +++ b/patches/wvdial-1.61/0001-remove-build-files.patch
> @@ -0,0 +1,552 @@
> +From 451b4b47aca6c7e6e2daaf1e6941b327f8a6efbe Mon Sep 17 00:00:00 2001
> +From: Sascha Hauer <s.hauer@pengutronix.de>
> +Date: Fri, 29 Sep 2017 09:04:00 +0200
> +Subject: [PATCH 1/2] remove build files
> +
> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> +---
> + Makefile.in        |  74 ----------------
> + config.defaults.mk |  35 --------
> + configure          |  13 ---
> + gen-cc             |  26 ------
> + wvrules-posix.mk   |  96 ---------------------
> + wvrules.mk         | 248 -----------------------------------------------------
> + 6 files changed, 492 deletions(-)
> + delete mode 100644 Makefile.in
> + delete mode 100644 config.defaults.mk
> + delete mode 100755 configure
> + delete mode 100755 gen-cc
> + delete mode 100644 wvrules-posix.mk
> + delete mode 100644 wvrules.mk
> +
> +diff --git a/Makefile.in b/Makefile.in
> +deleted file mode 100644
> +index ebe8c94..0000000
> +--- a/Makefile.in
> ++++ /dev/null
> +@@ -1,74 +0,0 @@
> +-WVPACKAGE_NAME=@PACKAGE_NAME@
> +-WVPACKAGE_STRING=@PACKAGE_STRING@
> +-WVPACKAGE_TARNAME=@PACKAGE_TARNAME@
> +-WVPACKAGE_VERSION=@PACKAGE_VERSION@
> +-
> +-prefix=/usr/local
> +-WVSTREAMS_INC=
> +-WVSTREAMS_LIB=
> +-WVSTREAMS_BIN=$(prefix)/bin
> +-WVSTREAMS_SRC=.
> +-
> +-PC_CFLAGS=$(shell pkg-config --cflags libwvstreams)
> +-ifeq ($(PC_CFLAGS),)
> +- $(error WvStreams does not appear to be installed)
> +-endif
> +-CPPFLAGS+=$(PC_CFLAGS)
> +-
> +-PC_LIBS=$(shell pkg-config --libs libwvstreams)
> +-ifeq ($(PC_LIBS),)
> +- $(error WvStreams does not appear to be installed)
> +-endif
> +-LIBS+=$(PC_LIBS)
> +-
> +-BINDIR=${prefix}/bin
> +-MANDIR=${prefix}/share/man
> +-PPPDIR=/etc/ppp/peers
> +-
> +-include wvrules.mk
> +-
> +-default: all papchaptest
> +-all: wvdial.a wvdial wvdialconf pppmon
> +-
> +-wvdial.a: wvdialer.o wvmodemscan.o wvpapchap.o wvdialbrain.o \
> +-	wvdialmon.o
> +-
> +-wvdial wvdialconf papchaptest pppmon: \
> +-  LDFLAGS+=-luniconf -lwvstreams -lwvutils -lwvbase
> +-
> +-wvdial wvdialconf papchaptest pppmon: wvdial.a
> +-
> +-install-bin: all
> +-	[ -d ${BINDIR}      ] || install -d ${BINDIR}
> +-	[ -d ${PPPDIR}      ] || install -d ${PPPDIR}
> +-	install -m 0755 wvdial wvdialconf ${BINDIR}
> +-	cp ppp.provider ${PPPDIR}/wvdial
> +-	cp ppp.provider-pipe ${PPPDIR}/wvdial-pipe
> +-
> +-install-man:
> +-	[ -d ${MANDIR}/man1 ] || install -d ${MANDIR}/man1
> +-	[ -d ${MANDIR}/man5 ] || install -d ${MANDIR}/man5
> +-	install -m 0644 wvdial.1 wvdialconf.1 ${MANDIR}/man1
> +-	install -m 0644 wvdial.conf.5 ${MANDIR}/man5
> +-
> +-install: install-bin install-man
> +-
> +-uninstall-bin:
> +-	rm -f ${BINDIR}/wvdial ${BINDIR}/wvdialconf
> +-	rm -f ${PPPDIR}/wvdial
> +-	rm -f ${PPPDIR}/wvdial-pipe
> +-
> +-uninstall-man:
> +-	rm -f ${MANDIR}/man1/wvdial.1 ${MANDIR}/man1/wvdialconf.1
> +-	rm -f ${MANDIR}/man5/wvdial.conf.5
> +-
> +-uninstall: uninstall-bin uninstall-man
> +-
> +-clean:
> +-	rm -f wvdial wvdialconf wvdialmon papchaptest pppmon
> +-
> +-distclean:
> +-	rm -f version.h Makefile
> +-
> +-.PHONY: clean all install-bin install-man install uninstall-bin uninstall-man \
> +-	uninstall
> +diff --git a/config.defaults.mk b/config.defaults.mk
> +deleted file mode 100644
> +index 1210f10..0000000
> +--- a/config.defaults.mk
> ++++ /dev/null
> +@@ -1,35 +0,0 @@
> +-COMPILER_STANDARD=posix
> +-EXEEXT=
> +-INSTALL=/usr/bin/install -c
> +-INSTALL_DATA=${INSTALL} -m 644
> +-INSTALL_PROGRAM=${INSTALL}
> +-INSTALL_SCRIPT=${INSTALL}
> +-LN_S=ln -s
> +-LN=ln
> +-MOC=/usr/bin/moc
> +-
> +-LIBS_DBUS=-ldbus-1
> +-LIBS_QT=-lqt-mt
> +-LIBS_PAM=-lpam
> +-LIBS_TCL=
> +-
> +-prefix=/usr/local
> +-datadir=${prefix}/share
> +-includedir=${prefix}/include
> +-infodir=${prefix}/share/info
> +-localstatedir=${prefix}/var
> +-mandir=${prefix}/share/man
> +-sharedstatedir=${prefix}/com
> +-sysconfdir=${prefix}/etc
> +-
> +-exec_prefix=${prefix}
> +-bindir=${exec_prefix}/bin
> +-libdir=${exec_prefix}/lib
> +-libexecdir=${exec_prefix}/libexec
> +-sbindir=${exec_prefix}/sbin
> +-
> +-enable_debug=yes
> +-enable_optimization=no
> +-enable_resolver_fork=
> +-enable_warnings=
> +-enable_testgui=
> +diff --git a/configure b/configure
> +deleted file mode 100755
> +index b878db2..0000000
> +--- a/configure
> ++++ /dev/null
> +@@ -1,13 +0,0 @@
> +-#!/bin/sh
> +-
> +-PACKAGE_NAME=wvdial
> +-PACKAGE_VERSION=1.61
> +-
> +-sed -e "s/@PACKAGE_NAME@/$PACKAGE_NAME/g" \
> +-    -e "s/@PACKAGE_TARNAME@/$PACKAGE_NAME/g" \
> +-    -e "s/@PACKAGE_STRING@/$PACKAGE_NAME $PACKAGE_VERSION/g" \
> +-    -e "s/@PACKAGE_VERSION@/$PACKAGE_VERSION/g" \
> +-    Makefile.in > Makefile
> +-
> +-sed -e "s/@PACKAGE_VERSION@/$PACKAGE_VERSION/g" version.h.in > version.h
> +-
> +diff --git a/gen-cc b/gen-cc
> +deleted file mode 100755
> +index 3793350..0000000
> +--- a/gen-cc
> ++++ /dev/null
> +@@ -1,26 +0,0 @@
> +-#!/bin/sh -e
> +-OUTFILE=$1
> +-EXT=$2
> +-echo "* Generating $OUTFILE" >&2
> +-TEMPFILE=gencc-$$.tmp
> +-
> +-cat >$TEMPFILE <<-EOF 
> +-	#!/bin/sh
> +-	set -e
> +-	
> +-	MODE=\$1
> +-	BASE=\$2
> +-	DIR=\$(dirname \$BASE)
> +-	DEPFILE=\$(dirname \$BASE)/.\$(basename \$BASE .o).d
> +-	shift
> +-	shift
> +-	
> +-	$CC \$MODE -o \$BASE.o \$BASE.$EXT \\
> +-	        -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\
> +-	        $CPPFLAGS \\
> +-	        $CFLAGS \\
> +-	        "\$@"
> +-EOF
> +-
> +-chmod a+x $TEMPFILE
> +-mv $TEMPFILE $OUTFILE
> +diff --git a/wvrules-posix.mk b/wvrules-posix.mk
> +deleted file mode 100644
> +index dfb2ed4..0000000
> +--- a/wvrules-posix.mk
> ++++ /dev/null
> +@@ -1,96 +0,0 @@
> +-ifdef _WIN32
> +-  LIBWVSTATIC=$(WVSTREAMS_LIB)/libwvstatic.a
> +-  LIBWVBASE=$(LIBWVSTATIC)
> +-  LIBWVUTILS=$(LIBWVSTATIC)
> +-  LIBWVSTREAMS=$(LIBWVSTATIC)
> +-  LIBUNICONF=$(LIBWVSTATIC)
> +-  LIBWVDBUS=$(LIBWVSTATIC) $(LIBS_DBUS)
> +-  LIBWVQT=$(LIBWVSTATIC)
> +-  LIBWVTEST=$(WVSTREAMS_LIB)/libwvtest.a $(LIBWVUTILS)
> +-else
> +-  LIBWVSTATIC=$(WVSTREAMS_LIB)/libwvstatic.a
> +-  LIBWVBASE=$(WVSTREAMS_LIB)/libwvbase.so
> +-  LIBWVUTILS=$(WVSTREAMS_LIB)/libwvutils.so $(LIBWVBASE)
> +-  LIBWVSTREAMS=$(WVSTREAMS_LIB)/libwvstreams.so $(LIBWVUTILS)
> +-  LIBUNICONF=$(WVSTREAMS_LIB)/libuniconf.so $(LIBWVSTREAMS)
> +-ifneq ("$(with_dbus)", "no")
> +-  LIBWVDBUS=$(WVSTREAMS_LIB)/libwvdbus.so $(LIBWVSTREAMS)
> +-endif
> +-ifneq ("$(with_qt)", "no")
> +-  LIBWVQT=$(WVSTREAMS_LIB)/libwvqt.so $(LIBWVSTREAMS)
> +-endif
> +-  LIBWVTEST=$(WVSTREAMS_LIB)/libwvtest.a $(LIBWVUTILS)
> +-endif
> +-
> +-#
> +-# Initial C compilation flags
> +-#
> +-INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH))
> +-
> +-CPPFLAGS += $(CPPOPTS)
> +-CFLAGS += $(COPTS)
> +-CXXFLAGS += $(CXXOPTS)
> +-LDFLAGS += $(LDOPTS) -L$(WVSTREAMS_LIB)
> +-
> +-# Default compiler we use for linking
> +-WVLINK_CC = $(CXX)
> +-
> +-ifneq ("$(enable_optimization)", "no")
> +-  CXXFLAGS+=-O2
> +-  CFLAGS+=-O2
> +-endif
> +-
> +-ifneq ("$(enable_warnings)", "no")
> +-  CXXFLAGS+=-Wall -Woverloaded-virtual
> +-  CFLAGS+=-Wall
> +-endif
> +-
> +-DEBUG:=$(filter-out no 0,$(enable_debug))
> +-ifdef DEBUG
> +-  CPPFLAGS += -ggdb -DDEBUG=1 $(patsubst %,-DDEBUG_%,$(DEBUG))
> +-  LDFLAGS += -ggdb
> +-else
> +-  CPPFLAGS += -DDEBUG=0
> +-  LDFLAGS += 
> +-endif
> +-
> +-define wvlink_ar
> +-	$(LINK_MSG)set -e; rm -f $1 $(patsubst %.a,%.libs,$1); \
> +-	echo $2 $($1-EXTRA) >$(patsubst %.a,%.libs,$1); \
> +-	$(AR) q $1 $(filter %.o,$2 $($1-EXTRA)); \
> +-	for d in "" $(filter %.libs,$2 $($1-EXTRA)); do \
> +-	    if [ "$$d" == "" ]; then \
> +-		continue; \
> +-	    fi; \
> +-	    cd $$(dirname "$$d"); \
> +-	    for c in $$(cat $$(basename "$$d")); do \
> +-		if echo $$c | grep -q "\.list$$"; then \
> +-		    for i in $$(cat $$c); do \
> +-			$(AR) q $(shell pwd)/$1 $$i; \
> +-		    done; \
> +-		else \
> +-		    $(AR) q $(shell pwd)/$1 $$c; \
> +-		fi; \
> +-	    done; \
> +-	    cd $(shell pwd); \
> +-	done; \
> +-	for l in "" $(filter %.list,$2 $($1-EXTRA)); do \
> +-	    if [ "$$l" == "" ]; then \
> +-		continue; \
> +-	    fi; \
> +-	    for i in $$(cat $$l); do \
> +-		$(AR) q $1 $$(dirname "$$l")/$$i; \
> +-	    done; \
> +-	done; \
> +-	$(AR) s $1
> +-endef
> +-
> +-CC: FORCE
> +-	@CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
> +-	  $(WVSTREAMS_SRC)/gen-cc CC c
> +-
> +-CXX: FORCE
> +-	@CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
> +-	  $(WVSTREAMS_SRC)/gen-cc CXX cc
> +-
> +-wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)
> +diff --git a/wvrules.mk b/wvrules.mk
> +deleted file mode 100644
> +index e2ab15f..0000000
> +--- a/wvrules.mk
> ++++ /dev/null
> +@@ -1,248 +0,0 @@
> +-# wvrules.mk
> +-#
> +-# Copyright (C) 1998-2007 by Avery Pennarun <apenwarr@alumnit.ca>
> +-#   and contributors.
> +-#   Use, distribute, modify, and redistribute freely.  (But if you're nice,
> +-#   you'll send all your changes back to me.)
> +-#
> +-# This is a complicated-looking set of Makefile rules that should make your
> +-# own Makefiles simpler, by providing for several useful features (like
> +-# autodependencies and a 'clean' target) without any extra effort.
> +-#
> +-# It will only work with GNU make.
> +-#
> +-
> +-# we need a default rule, since the 'includes' below can cause trouble
> +-.PHONY: default all
> +-default: all
> +-
> +-all: CC CXX
> +-
> +-# if WVSTREAMS_SRC is set assume everything else is set.
> +-# For packages that use WvStreams use WVSTREAMS_SRC=. for distribution.
> +-ifneq ($(WVSTREAMS),)
> +-  WVSTREAMS_SRC=$(WVSTREAMS)
> +-  WVSTREAMS_LIB=$(WVSTREAMS)
> +-  WVSTREAMS_INC=$(WVSTREAMS)/include
> +-  WVSTREAMS_BIN=$(WVSTREAMS)
> +-endif
> +-export WVSTREAMS WVSTREAMS_SRC WVSTREAMS_LIB WVSTREAMS_INC WVSTREAMS_BIN
> +-
> +-SHELL=/bin/bash
> +-
> +-include $(WVSTREAMS_SRC)/config.defaults.mk
> +--include $(WVSTREAMS_SRC)/config.mk
> +--include $(WVSTREAMS_SRC)/config.overrides.mk
> +--include $(WVSTREAMS_SRC)/local.mk
> +-
> +-ifeq (${EXEEXT},.exe)
> +-  _WIN32=_WIN32
> +-  XPATH += $(WVSTREAMS)/win32 $(WVSTREAMS)/win32/cominclude
> +-  AR=i586-mingw32msvc-ar
> +-  LIBS += -lssl -lcrypto -lz -lole32 -lrpcrt4 -lwsock32 -lgdi32 -limagehlp \
> +-  	  -lxplc-cxx -lxplc -lstdc++
> +-else
> +-  CFLAGS += -fPIC
> +-  CXXFLAGS += -fPIC
> +-endif
> +-
> +-include $(WVSTREAMS_SRC)/wvrules-$(COMPILER_STANDARD).mk
> +-
> +-ifeq (${WVTESTRUN},)
> +-  WVTESTRUN=$(WVSTREAMS_BIN)/wvtestrunner.pl
> +-endif
> +-
> +-# macros that expand to the object files in the given directories
> +-objects=$(sort $(foreach type,c cc,$(call objects_$(type),$1)))
> +-objects_c=$(filter-out $(WV_EXCLUDES), \
> +-		$(patsubst %.c,%.o,$(wildcard $(addsuffix /*.c,$1))))
> +-objects_cc=$(filter-out $(WV_EXCLUDES), \
> +-		$(patsubst %.cc,%.o,$(wildcard $(addsuffix /*.cc,$1))))
> +-tests_cc=$(filter-out $(WV_EXCLUDES), \
> +-		$(patsubst %.cc,%,$(wildcard $(addsuffix /*.cc,$1))))
> +-
> +-# default "test" rule does nothing...
> +-.PHONY: test runtests
> +-test:
> +-runtests:
> +-
> +-%/test:
> +-	$(MAKE) -C $(dir $@) test
> +-
> +-INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH))
> +-CPPFLAGS+=$(INCFLAGS) \
> +-	-D_BSD_SOURCE -D_GNU_SOURCE $(OSDEFINE) \
> +-	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
> +-	-DUNSTABLE
> +-
> +-ifeq ($(VERBOSE),1)
> +-  COMPILE_MSG :=
> +-  LINK_MSG :=
> +-  DEPEND_MSG :=
> +-  SYMLINK_MSG :=
> +-else
> +-  COMPILE_MSG = @echo compiling $@...;
> +-  LINK_MSG = @echo linking $@...;
> +-  #DEPEND_MSG = @echo "   depending $@...";
> +-  DEPEND_MSG := @
> +-  SYMLINK_MSG := @
> +-endif
> +-
> +-# any rule that depends on FORCE will always run
> +-.PHONY: FORCE
> +-FORCE:
> +-
> +-ifeq ($(LN_S),)
> +-  LN_S := ln -s
> +-endif
> +-ifeq ($(LN),)
> +-  LN := ln
> +-endif
> +-
> +-# Create symbolic links
> +-# usage: $(wvlns,source,dest)
> +-wvlns=$(SYMLINK_MSG)$(LN_S) -f $1 $2
> +-
> +-# Create hard links
> +-# usage: $(wvln,source,dest)
> +-wvln=$(SYMLINK_MSG)$(LN) -f $1 $2
> +-
> +-# usage: $(wvcc,outfile,infile,stem,extra_cflags,mode)
> +-#    eg: $(wvcc,foo.o,foo.cc,foo,-fPIC,-c)
> +-
> +-define wvcc
> +-	./CC $(if $5,$5,-c) $3 $($1-CFLAGS) $($1-CPPFLAGS) $4
> +-endef
> +-
> +-define wvcxx
> +-	./CXX $(if $5,$5,-c) $3 $($1-CXXFLAGS) $($1-CPPFLAGS) $4
> +-endef
> +-
> +-%.so: SONAME=$@$(if $(SO_VERSION),.$(SO_VERSION))
> +-
> +-wvsoname=$(if $($1-SONAME),$($1-SONAME),$(if $(SONAME),$(SONAME),$1))
> +-ifdef _WIN32
> +-  define wvlink_so
> +-	@echo "Skipping $@ on win32 (can't build shared libraries)"
> +-  endef
> +-else
> +-  define wvlink_so
> +-	$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -Wl,-z,defs -Wl,-soname,$(call wvsoname,$1) -shared -o $1 $(filter %.o %.a %.so,$2) $($1-LIBS) $(LIBS) $(XX_LIBS)
> +-	$(if $(filter-out $(call wvsoname,$1),$1),$(call wvlns,$1,$(call wvsoname,$1)))
> +-  endef
> +-endif
> +-
> +-../%.so:;	@echo "Shared library $@ does not exist!"; exit 1
> +-../%.a:;	@echo "Library $@ does not exist!"; exit 1
> +-../%.o:;	@echo "Object $@ does not exist!"; exit 1
> +-/%.a:;		@echo "Library $@ does not exist!"; exit 1
> +-
> +-%.o: %.c;	$(call wvcc ,$@,$<,$*)
> +-%.fpic.o: %.c;	$(call wvcc ,$@,$<,$*,-fPIC)
> +-%.o: %.cc;	$(call wvcxx,$@,$<,$*)
> +-%.fpic.o: %.cc;	$(call wvcxx,$@,$<,$*,-fPIC)
> +-%.o: %.cpp;	$(call wvcxx,$@,$<,$*)
> +-%.fpic.o:%.cpp; $(call wvcxx,$@,$<,$*,-fPIC)
> +-%.s: %.c;	$(call wvcc ,$@,$<,$*,,-S)
> +-%.s: %.cc;	$(call wvcxx,$@,$<,$*,,-S)
> +-%.s: %.cpp;	$(call wvcxx,$@,$<,$*,,-S)
> +-%.E: %.c;	$(call wvcc,$@,$<,$*,,-E)
> +-%.E: %.cc;	$(call wvcxx,$@,$<,$*,,-E)
> +-%.E: %.cpp;	$(call wvcxx,$@,$<,$*,,-E)
> +-
> +-%.moc: %.h;	moc -o $@ $<
> +-
> +-%: %.o;		$(call wvlink,$@,$^) 
> +-%.t: %.t.o;	$(call wvlink,$@,$(call reverse,$(filter %.o,$^)) $(filter-out %.o,$^) $(LIBWVTEST))
> +-%.a %.libs:;	$(call wvlink_ar,$@,$^)
> +-%.so:;		$(call wvlink_so,$@,$^)
> +-
> +-# Force objects to be built before final binaries	
> +-$(addsuffix .o,$(basename $(wildcard *.c) $(wildcard *.cc) $(wildcard *.cpp))):
> +-
> +-%.gz: FORCE %
> +-	@rm -f $@
> +-	gzip -f $*
> +-	@ls -l $@
> +-
> +-#
> +-# We automatically generate header dependencies for .c and .cc files.  The
> +-# dependencies are stored in the file ".filename.d", and we include them
> +-# automatically here if they exist.
> +-#
> +--include $(shell find . -name '.*.d') /dev/null
> +-
> +-
> +-#
> +-# A macro for compiling subdirectories listed in the SUBDIRS variable.
> +-# Tries to make the target ($@) in each subdir, unless the target is called
> +-# "subdirs" in which case it makes "all" in each subdir.
> +-#
> +-define subdirs_func
> +-	+@OLDDIR="$$(pwd)"; set -e; \
> +-	for d in __fx__ $2; do \
> +-		if [ "$$d" = "__fx__" ]; then continue; fi; \
> +-		cd "$$d"; \
> +-		echo ; \
> +-		echo "--> Making $1 in $$(pwd)..."; \
> +-		$(MAKE) --no-print-directory $1 || exit 1; \
> +-		cd "$$OLDDIR"; \
> +-	done
> +-	@echo
> +-	@echo "--> Back in $$(pwd)..."
> +-endef
> +-
> +-subdirs = $(call subdirs_func,$(subst subdirs,all,$(if $1,$1,$@)),$(if $2,$2,$(SUBDIRS)))
> +-
> +-define shell_reverse
> +-	revlist="" ; \
> +-	for word in $(1) ; do \
> +-		revlist="$${word} $${revlist}"; \
> +-	done ; \
> +-	echo "$${revlist}"
> +-endef
> +-reverse = $(shell $(call shell_reverse,$(1)))
> +-
> +-clean_subdirs = $(call subdirs,clean,$(call reverse,$(SUBDIRS)),keep)
> +-
> +-%: %/Makefile FORCE
> +-	@cd "$@"; echo; echo "--> Making all in $$(pwd)..."; \
> +-		$(MAKE) --no-print-directory all
> +-
> +-subdirs: ${SUBDIRS}
> +-
> +-#
> +-# Auto-clean rule.  Feel free to append to this in your own directory, by
> +-# defining your own "clean" and/or "distclean" rules.
> +-#
> +-.PHONY: clean _wvclean
> +-
> +-clean: _wvclean
> +-
> +-_wvclean:
> +-	@echo '--> Cleaning $(shell pwd)...'
> +-	@rm -f *~ *.tmp *.o *.a *.so *.so.* *.libs *.dll *.lib *.moc *.d .*.d .depend \
> +-		 .\#* .tcl_paths pkgIndex.tcl gmon.out core build-stamp \
> +-		 CC CXX \
> +-		 wvtestmain
> +-	@rm -f $(patsubst %.t.cc,%.t,$(wildcard *.t.cc) $(wildcard t/*.t.cc)) \
> +-		t/*.o t/*~ t/.*.d t/.\#*
> +-	@rm -f valgrind.log.pid*
> +-	@rm -f semantic.cache tags
> +-	@rm -rf debian/tmp
> +-
> +-dist-hook:
> +-
> +-PKGDIR=$(WVPACKAGE_TARNAME)-$(WVPACKAGE_VERSION)
> +-
> +-dist: dist-hook
> +-	@echo '--> Making dist in ../build/$(PKGDIR)...'
> +-	@test -d ../build || mkdir ../build
> +-	@rsync -a --delete --force '$(shell pwd)/' '../build/$(PKGDIR)'
> +-	cd ../build/$(PKGDIR) && git clean -d -f -x
> +-	cd ../build/$(PKGDIR) && git log > ChangeLog
> +-	@find '../build/$(PKGDIR)' -name .git -type d -print0 | xargs -0 rm -rf --
> +-	@find '../build/$(PKGDIR)' -name .gitignore -type f -print0 | xargs -0 rm -f --
> +-	@rm -f '../build/$(PKGDIR).tar.gz'
> +-	@cd ../build; tar -zcf '$(PKGDIR).tar.gz' '$(PKGDIR)'
> +-	@echo '--> Created tarball in ../build/$(PKGDIR).tar.gz.'
> +-- 
> +2.11.0
> +
> diff --git a/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch b/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
> new file mode 100644
> index 000000000..7db523796
> --- /dev/null
> +++ b/patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
> @@ -0,0 +1,292 @@
> +From 11b27016243b7a995faf914cac3bf8ac91ec6be8 Mon Sep 17 00:00:00 2001
> +From: Sascha Hauer <s.hauer@pengutronix.de>
> +Date: Fri, 29 Sep 2017 09:12:45 +0200
> +Subject: [PATCH 2/2] Add autoconf/automake files
> +
> +Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> +---
> + Makefile.am   | 51 +++++++++++++++++++++++++++++++
> + autogen.sh    | 27 +++++++++++++++++
> + configure.ac  | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> + m4/.gitignore |  5 ++++
> + wvdial.cc     |  4 +--
> + wvdialconf.cc |  4 +--
> + wvdialer.cc   |  4 +--
> + 7 files changed, 185 insertions(+), 6 deletions(-)
> + create mode 100644 Makefile.am
> + create mode 100755 autogen.sh
> + create mode 100644 configure.ac
> + create mode 100644 m4/.gitignore
> +
> +diff --git a/Makefile.am b/Makefile.am
> +new file mode 100644
> +index 0000000..b548922
> +--- /dev/null
> ++++ b/Makefile.am
> +@@ -0,0 +1,51 @@
> ++EXTRA_DIST =
> ++CLEANFILES =
> ++ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
> ++AM_MAKEFLAGS = --no-print-directory
> ++
> ++AM_CPPFLAGS = \
> ++	-include $(top_builddir)/config.h \
> ++	-DSYSCONFDIR=\""$(sysconfdir)"\" \
> ++	-I${top_srcdir}/src
> ++
> ++AM_CXXFLAGS = \
> ++	${WVSTREAMS_CFLAGS} \
> ++	${WVUTILS_CFLAGS} \
> ++	${UNICONF_CFLAGS} \
> ++	${WVBASE_CFLAGS}
> ++
> ++AM_CFLAGS = ${my_CFLAGS} \
> ++	-fvisibility=hidden \
> ++	-ffunction-sections \
> ++	-fdata-sections
> ++
> ++AM_LDFLAGS = \
> ++	-Wl,--gc-sections \
> ++	-Wl,--as-needed \
> ++	${WVSTREAMS_LIBS} \
> ++	${WVUTILS_LIBS} \
> ++	${UNICONF_LIBS} \
> ++	${WVBASE_LIBS}
> ++
> ++noinst_LIBRARIES = libwvdial.a
> ++libwvdial_a_SOURCES =  wvdialer.cc \
> ++			wvdialer.h \
> ++			wvdialmon.cc \
> ++			wvdialmon.h \
> ++			wvdialbrain.cc \
> ++			wvdialbrain.h \
> ++			wvpapchap.cc \
> ++			wvpapchap.h \
> ++			wvmodemscan.cc \
> ++			wvmodemscan.h
> ++
> ++bin_PROGRAMS = wvdial papchaptest pppmon
> ++
> ++wvdial_SOURCES = wvdial.cc
> ++wvdial_LDADD = libwvdial.a
> ++
> ++papchaptest_SOURCES = papchaptest.cc
> ++papchaptest_LDADD = libwvdial.a
> ++
> ++pppmon_SOURCES = pppmon.cc
> ++pppmon_LDADD = libwvdial.a
> +diff --git a/autogen.sh b/autogen.sh
> +new file mode 100755
> +index 0000000..16c0eb3
> +--- /dev/null
> ++++ b/autogen.sh
> +@@ -0,0 +1,27 @@
> ++#!/bin/sh
> ++
> ++set -e
> ++
> ++if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
> ++        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
> ++        chmod +x .git/hooks/pre-commit && \
> ++        echo "Activated pre-commit hook."
> ++fi
> ++
> ++autoreconf --install --symlink
> ++
> ++libdir() {
> ++        echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
> ++}
> ++
> ++args="--prefix=/usr \
> ++--sysconfdir=/etc \
> ++--libdir=$(libdir /usr/lib)"
> ++
> ++echo
> ++echo "----------------------------------------------------------------"
> ++echo "Initialized build system. For a common configuration please run:"
> ++echo "----------------------------------------------------------------"
> ++echo
> ++echo "./configure CFLAGS='-g -O0' $args"
> ++echo
> +diff --git a/configure.ac b/configure.ac
> +new file mode 100644
> +index 0000000..13858b0
> +--- /dev/null
> ++++ b/configure.ac
> +@@ -0,0 +1,96 @@
> ++AC_PREREQ(2.60)
> ++AC_INIT([wvdial],
> ++        [1.61],
> ++        [s.hauer@pengutronix.de],
> ++        [wvdial],
> ++        [http://www.pengutronix.de])
> ++AC_CONFIG_SRCDIR([wvdial.cc])
> ++AC_CONFIG_AUX_DIR([build-aux])
> ++AM_INIT_AUTOMAKE([
> ++	check-news
> ++	foreign
> ++	1.11
> ++	-Wall
> ++	-Wno-portability
> ++	silent-rules
> ++	tar-pax
> ++	no-dist-gzip
> ++	dist-xz
> ++	subdir-objects
> ++])
> ++AC_PROG_CC_STDC
> ++AC_PROG_CXX
> ++AC_USE_SYSTEM_EXTENSIONS
> ++AC_SYS_LARGEFILE
> ++AC_CONFIG_MACRO_DIR([m4])
> ++AM_SILENT_RULES([yes])
> ++LT_INIT([
> ++	disable-static
> ++	pic-only
> ++])
> ++AC_PREFIX_DEFAULT([/usr])
> ++
> ++AC_PROG_SED
> ++AC_PROG_MKDIR_P
> ++
> ++PKG_CHECK_MODULES(WVSTREAMS, [ libwvstreams >= 4.6.1 ])
> ++PKG_CHECK_MODULES(UNICONF, [ libuniconf >= 4.6.1 ])
> ++PKG_CHECK_MODULES(WVUTILS, [ libwvutils >= 4.6.1 ])
> ++PKG_CHECK_MODULES(WVBASE, [ libwvbase >= 4.6.1 ])
> ++
> ++AC_ARG_ENABLE([logging],
> ++        AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
> ++        [], enable_logging=yes)
> ++AS_IF([test "x$enable_logging" = "xyes"], [
> ++        AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
> ++])
> ++
> ++AC_ARG_ENABLE([debug],
> ++        AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
> ++        [], [enable_debug=no])
> ++AS_IF([test "x$enable_debug" = "xyes"], [
> ++        AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
> ++])

I don't think ENABLE_LOGGING or ENABLE_DEBUG are used, right?

> ++
> ++AC_CHECK_FUNCS([ \
> ++	__secure_getenv \
> ++	secure_getenv\
> ++])
> ++
> ++my_CFLAGS="\
> ++-Wall \
> ++-Wchar-subscripts \
> ++-Wformat-security \
> ++-Wmissing-declarations \
> ++-Wmissing-prototypes \
> ++-Wnested-externs \
> ++-Wpointer-arith \
> ++-Wshadow \
> ++-Wsign-compare \
> ++-Wstrict-prototypes \
> ++-Wtype-limits \
> ++"
> ++AC_SUBST([my_CFLAGS])
> ++
> ++AC_CONFIG_HEADERS(config.h)
> ++AC_CONFIG_FILES([
> ++        Makefile
> ++])
> ++
> ++AC_OUTPUT
> ++AC_MSG_RESULT([
> ++        $PACKAGE $VERSION
> ++        =====
> ++
> ++        prefix:                 ${prefix}
> ++        sysconfdir:             ${sysconfdir}
> ++        libdir:                 ${libdir}
> ++        includedir:             ${includedir}
> ++
> ++        compiler:               ${CC}
> ++        cflags:                 ${CFLAGS}
> ++        ldflags:                ${LDFLAGS}
> ++
> ++        logging:                ${enable_logging}
> ++        debug:                  ${enable_debug}
> ++])
> +diff --git a/m4/.gitignore b/m4/.gitignore
> +new file mode 100644
> +index 0000000..38066dd
> +--- /dev/null
> ++++ b/m4/.gitignore
> +@@ -0,0 +1,5 @@
> ++libtool.m4
> ++ltoptions.m4
> ++ltsugar.m4
> ++ltversion.m4
> ++lt~obsolete.m4
> +diff --git a/wvdial.cc b/wvdial.cc
> +index 3152be4..e6c6504 100644
> +--- a/wvdial.cc
> ++++ b/wvdial.cc
> +@@ -9,7 +9,7 @@
> + 
> + #include "wvargs.h"
> + #include "wvdialer.h"
> +-#include "version.h"
> ++#include "config.h"
> + #include "wvlog.h"
> + #include "wvlogrcv.h"
> + #include "wvlogfile.h"
> +@@ -102,7 +102,7 @@ int main(int argc, char **argv)
> +     signal(SIGHUP, signalhandler);
> + 
> +     WvArgs args;
> +-    args.set_version("WvDial " WVDIAL_VER_STRING "\n"
> ++    args.set_version("WvDial " VERSION "\n"
> + 		     "Copyright (c) 1997-2005 Net Integration Technologies, "
> + 		     "Inc.");
> +     args.set_help_header("An intelligent PPP dialer.");
> +diff --git a/wvdialconf.cc b/wvdialconf.cc
> +index de25ac0..273038b 100644
> +--- a/wvdialconf.cc
> ++++ b/wvdialconf.cc
> +@@ -10,7 +10,7 @@
> + #include "wvfile.h"
> + #include "wvmodemscan.h"
> + #include "wvstrutils.h"
> +-#include "version.h"
> ++#include "config.h"
> + #include <ctype.h>
> + 
> + 
> +@@ -54,7 +54,7 @@ int main(int argc, char **argv)
> +     WvString conffilename("/etc/wvdial.conf");
> + 
> +     WvArgs args;
> +-    args.set_version("WvDialConf " WVDIAL_VER_STRING "\n"
> ++    args.set_version("WvDialConf " VERSION "\n"
> + 		     "Copyright (c) 1997-2005 Net Integration Technologies, "
> + 		     "Inc.");
> +     args.set_help_header("Create or update a WvDial configuration file");
> +diff --git a/wvdialer.cc b/wvdialer.cc
> +index eae6952..2892210 100644
> +--- a/wvdialer.cc
> ++++ b/wvdialer.cc
> +@@ -7,7 +7,7 @@
> +  */
> + 
> + #include "wvdialer.h"
> +-#include "version.h"
> ++#include "config.h"
> + 
> + #include <sys/types.h>
> + #include <sys/stat.h>
> +@@ -83,7 +83,7 @@ WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
> +     sect_list = _sect_list;
> +     chat_mode = _chat_mode;
> +     
> +-    log("WvDial: Internet dialer version " WVDIAL_VER_STRING "\n");
> ++    log("WvDial: Internet dialer version " VERSION "\n");
> + 
> +     // Ensure all sections in sect_list actually exist, warning if not.
> +     WvStringList::Iter iter(*sect_list);
> +-- 
> +2.11.0
> +
> diff --git a/patches/wvdial-1.61/autogen.sh b/patches/wvdial-1.61/autogen.sh
> new file mode 100755
> index 000000000..16c0eb380
> --- /dev/null
> +++ b/patches/wvdial-1.61/autogen.sh
> @@ -0,0 +1,27 @@
> +#!/bin/sh
> +
> +set -e
> +
> +if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
> +        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
> +        chmod +x .git/hooks/pre-commit && \
> +        echo "Activated pre-commit hook."
> +fi
> +
> +autoreconf --install --symlink
> +
> +libdir() {
> +        echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
> +}
> +
> +args="--prefix=/usr \
> +--sysconfdir=/etc \
> +--libdir=$(libdir /usr/lib)"
> +
> +echo
> +echo "----------------------------------------------------------------"
> +echo "Initialized build system. For a common configuration please run:"
> +echo "----------------------------------------------------------------"
> +echo
> +echo "./configure CFLAGS='-g -O0' $args"
> +echo
> diff --git a/patches/wvdial-1.61/series b/patches/wvdial-1.61/series
> new file mode 100644
> index 000000000..4efc62ad1
> --- /dev/null
> +++ b/patches/wvdial-1.61/series
> @@ -0,0 +1,2 @@
> +0001-remove-build-files.patch
> +0002-Add-autoconf-automake-files.patch
> diff --git a/rules/wvdial.in b/rules/wvdial.in
> new file mode 100644
> index 000000000..e3582cbd5
> --- /dev/null
> +++ b/rules/wvdial.in
> @@ -0,0 +1,32 @@
> +## SECTION=networking
> +
> +menuconfig WVDIAL
> +	tristate
> +	select WVSTREAMS
> +	prompt "wvdial                        "
> +	help
> +	  intelligent Point-to-Point Protocol dialer
> +
> +	  WvDial sacrifices some of the flexibility of programs like "chat" in
> +	  order to make dialup configuration easier. With WvDial, modems are
> +	  detected automatically and only three additional parameters are
> +	  required: the telephone number, username, and password. WvDial knows
> +	  enough to dial with most modems and log in to most servers without
> +	  any other help.
> +	  
> +	  In particular, a "chat script" is not required to handle the most common situations.
> +
> +if WVDIAL
> +	config WVDIAL_WVDIAL
> +	bool
> +	prompt "install wvdial"
> +
> +	config WVDIAL_PPPMON
> +	bool
> +	prompt "install pppmon"
> +
> +	config WVDIAL_PAPCHAPTEST
> +	bool
> +	prompt "install papchaptest"

don't indent 'config' here.

> +endif
> +	
> diff --git a/rules/wvdial.make b/rules/wvdial.make
> new file mode 100644
> index 000000000..080a29adc
> --- /dev/null
> +++ b/rules/wvdial.make
> @@ -0,0 +1,69 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_WVDIAL) += wvdial
> +
> +#
> +# Paths and names
> +#
> +WVDIAL_VERSION	:= 1.61
> +WVDIAL_MD5	:= 124676b98f9bbd1c0366fdc0d2848bc9
> +WVDIAL		:= wvdial-$(WVDIAL_VERSION)
> +WVDIAL_SUFFIX	:= tar.gz
> +WVDIAL_URL	:= http://http.debian.net/debian/pool/main/w/wvdial/wvdial_1.61.orig.$(WVDIAL_SUFFIX)
> +WVDIAL_SOURCE	:= $(SRCDIR)/$(WVDIAL).$(WVDIAL_SUFFIX)
> +WVDIAL_DIR	:= $(BUILDDIR)/$(WVDIAL)
> +WVDIAL_LICENSE	:= unknown
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#WVDIAL_CONF_ENV	:= $(CROSS_ENV)

remove.

> +
> +#
> +# autoconf
> +#
> +WVDIAL_CONF_TOOL	:= autoconf
> +#WVDIAL_CONF_OPT	:= $(CROSS_AUTOCONF_USR)

remove.

Michael

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/wvdial.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, wvdial)
> +	@$(call install_fixup, wvdial,PRIORITY,optional)
> +	@$(call install_fixup, wvdial,SECTION,base)
> +	@$(call install_fixup, wvdial,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
> +	@$(call install_fixup, wvdial,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_WVDIAL_WVDIAL
> +	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/wvdial)
> +endif
> +
> +ifdef PTXCONF_WVDIAL_PPPMON
> +	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/pppmon)
> +endif
> +
> +ifdef PTXCONF_WVDIAL_PAPCHAPTEST
> +	@$(call install_copy, wvdial, 0, 0, 0755, -, /usr/bin/papchaptest)
> +endif
> +
> +	@$(call install_finish, wvdial)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-09-30 11:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 13:52 [ptxdist] [PATCH 1/2] wvstreams: " Sascha Hauer
2017-09-29 13:52 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
2017-09-30 11:02   ` Michael Olbrich [this message]
2017-09-30 10:59 ` [ptxdist] [PATCH 1/2] wvstreams: " Michael Olbrich
2017-10-16 12:15 Sascha Hauer
2017-10-16 12:15 ` [ptxdist] [PATCH 2/2] wvdial: " Sascha Hauer
2017-10-16 12:36   ` Ladislav Michl
2017-10-16 12:42     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170930110239.az3bg7fhhsiv7zwy@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox