From b7acf87b24c3ac54be88ade5718c9d9f307ee3ea Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Fri, 10 Jun 2005 06:26:58 +0000 Subject: * cppunit: added; patch by Shahar Livne git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@2728 33e552b5-05e3-0310-8538-816dae2090ed --- ChangeLog | 1 + rules/cppunit.in | 11 ++++ rules/cppunit.make | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++ rules/debug.in | 2 + 4 files changed, 169 insertions(+) create mode 100644 rules/cppunit.in create mode 100644 rules/cppunit.make diff --git a/ChangeLog b/ChangeLog index e49823950..ad31693b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2005-06-10 Robert Schwebel * valgrind: added; patch by Shahar Livne + * cppunit: added; patch by Shahar Livne 2005-06-06 Robert Schwebel diff --git a/rules/cppunit.in b/rules/cppunit.in new file mode 100644 index 000000000..b4ef83920 --- /dev/null +++ b/rules/cppunit.in @@ -0,0 +1,11 @@ +menu "CppUnit " + +config CPPUNIT + bool + prompt "Compile CppUnit" + help + cppunit is a C++ port of JUnit. It is a testing framework. + For more info, check: + http://sourceforge.net/projects/cppunit + http://cppunit.sourceforge.net/doc/1.9.11 +endmenu diff --git a/rules/cppunit.make b/rules/cppunit.make new file mode 100644 index 000000000..b1d75b62f --- /dev/null +++ b/rules/cppunit.make @@ -0,0 +1,155 @@ +# -*-makefile-*- +# $Id: cppunit.make $ +# +# Copyright (C) 2005 by Shahar Livne +# +# 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 +# +ifdef PTXCONF_CPPUNIT +PACKAGES += cppunit +endif + +# +# Paths and names +# +CPPUNIT_VERSION = 1.10.2 +CPPUNIT = cppunit-$(CPPUNIT_VERSION) +CPPUNIT_SUFFIX = tar.gz +CPPUNIT_URL = $(PTXCONF_SETUP_SFMIRROR)/cppunit/$(CPPUNIT).$(CPPUNIT_SUFFIX) +CPPUNIT_SOURCE = $(SRCDIR)/$(CPPUNIT).$(CPPUNIT_SUFFIX) +CPPUNIT_DIR = $(BUILDDIR)/$(CPPUNIT) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +cppunit_get: $(STATEDIR)/cppunit.get + +cppunit_get_deps = $(CPPUNIT_SOURCE) + +$(STATEDIR)/cppunit.get: $(cppunit_get_deps) + @$(call targetinfo, $@) + @$(call get_patches, $(CPPUNIT)) + touch $@ + +$(CPPUNIT_SOURCE): + @$(call targetinfo, $@) + @$(call get, $(CPPUNIT_URL)) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +cppunit_extract: $(STATEDIR)/cppunit.extract + +cppunit_extract_deps = $(STATEDIR)/cppunit.get + +$(STATEDIR)/cppunit.extract: $(cppunit_extract_deps) + @$(call targetinfo, $@) + @$(call clean, $(CPPUNIT_DIR)) + @$(call extract, $(CPPUNIT_SOURCE)) + @$(call patchin, $(CPPUNIT)) + touch $@ + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +cppunit_prepare: $(STATEDIR)/cppunit.prepare + +# +# dependencies +# +cppunit_prepare_deps = \ + $(STATEDIR)/cppunit.extract + + +CPPUNIT_PATH = PATH=$(CROSS_PATH) +CPPUNIT_ENV = $(CROSS_ENV) +#CPPUNIT_ENV += + +# +# autoconf +# +CPPUNIT_AUTOCONF = $(CROSS_AUTOCONF) + +$(STATEDIR)/cppunit.prepare: $(cppunit_prepare_deps) + @$(call targetinfo, $@) + @$(call clean, $(CPPUNIT_DIR)/config.cache) + cd $(CPPUNIT_DIR) && \ + $(CPPUNIT_PATH) $(CPPUNIT_ENV) \ + ./configure $(CPPUNIT_AUTOCONF) + touch $@ + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +cppunit_compile: $(STATEDIR)/cppunit.compile + +cppunit_compile_deps = $(STATEDIR)/cppunit.prepare + +$(STATEDIR)/cppunit.compile: $(cppunit_compile_deps) + @$(call targetinfo, $@) + cd $(CPPUNIT_DIR) && $(CPPUNIT_ENV) $(CPPUNIT_PATH) make + touch $@ + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +cppunit_install: $(STATEDIR)/cppunit.install + +$(STATEDIR)/cppunit.install: $(STATEDIR)/cppunit.compile + @$(call targetinfo, $@) + cd $(CPPUNIT_DIR) && $(CPPUNIT_PATH) make install + touch $@ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +cppunit_targetinstall: $(STATEDIR)/cppunit.targetinstall + +cppunit_targetinstall_deps = $(STATEDIR)/cppunit.install + +$(STATEDIR)/cppunit.targetinstall: $(cppunit_targetinstall_deps) + @$(call targetinfo, $@) + + @$(call install_init,default) + @$(call install_fixup,PACKAGE,$(CPPUNIT)) + @$(call install_fixup,PRIORITY,optional) + @$(call install_fixup,VERSION,$(CPPUNIT_VERSION)) + @$(call install_fixup,SECTION,base) + @$(call install_fixup,AUTHOR,"Shahar Livne ") + @$(call install_fixup,DEPENDS,) + @$(call install_fixup,DESCRIPTION,missing) + + @$(call install_copy, 0, 0, 0644, \ + $(CPPUNIT_DIR)/src/cppunit/.libs/libcppunit-1.10.so.2.0.0, \ + /usr/lib/libcppunit-1.10.so.2.0.0) + + @$(call install_link, libcppunit-1.10.so.2.0.0, /usr/lib/libcppunit-1.10.so.2) + @$(call install_link, libcppunit-1.10.so.2.0.0, /usr/lib/libcppunit.so) + + @$(call install_finish) + + touch $@ + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +cppunit_clean: + rm -rf $(STATEDIR)/cppunit.* + rm -rf $(IMAGEDIR)/cppunit_* + rm -rf $(CPPUNIT_DIR) + +# vim: syntax=make diff --git a/rules/debug.in b/rules/debug.in index 1bfa62c5d..135675d19 100644 --- a/rules/debug.in +++ b/rules/debug.in @@ -1,5 +1,7 @@ menu "Debugging Tools " +source "rules/cppunit.in" + source "rules/gdb.in" config KSYMOOPS -- cgit v1.2.3