From 936035a5b422820e3a021370627388357d6cb87e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 27 Feb 2006 17:45:54 +0000 Subject: added patch to completely fix the versioning and move the PD_VERSION replacement to 'make install'; 'make unpatch_pd' now does the reverse of 'make patch_pd'; and PD_TEST_VERSION is now retrieved from m_pd.h svn path=/trunk/; revision=4623 --- packages/Makefile | 8 +- packages/Makefile.buildlayout | 9 +- .../put_version_into_aboutpd_page-0.40-pre.patch | 113 +++++++++++++++++++++ 3 files changed, 123 insertions(+), 7 deletions(-) create mode 100644 packages/patches/put_version_into_aboutpd_page-0.40-pre.patch diff --git a/packages/Makefile b/packages/Makefile index b2ed5b50..18409ebe 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -641,12 +641,12 @@ devsymlinks_clean: patch_pd: @echo pd_src $(pd_src) # apply all platform-neutral patches - for patch in $(wildcard $(CWD)/patches/*.patch); do \ + for patch in $(shell ls -1 $(CWD)/patches/*.patch); do \ echo "Applying $$patch"; \ cd $(pd_src)/src/ && patch -p0 < $$patch; \ done # apply all platform-specific patches - for patch in $(wildcard $(CWD)/patches/$(OS_NAME)/*.patch); do \ + for patch in $(shell ls -1 $(CWD)/patches/$(OS_NAME)/*.patch); do \ echo "Applying $$patch"; \ cd $(pd_src)/src/ && patch -p0 < $$patch; \ done @@ -668,12 +668,12 @@ unpatch_pd: m_pd.h > m_pd.h.tmp && \ mv m_pd.h.tmp m_pd.h # apply all platform-specific patches - for patch in $(wildcard $(CWD)/patches/$(OS_NAME)/*.patch); do \ + for patch in $(shell ls -1r $(CWD)/patches/$(OS_NAME)/*.patch); do \ echo "Applying $$patch"; \ cd $(pd_src)/src/ && patch -p0 -R < $$patch; \ done # apply all platform-neutral patches - for patch in $(wildcard $(CWD)/patches/*.patch); do \ + for patch in $(shell ls -1r $(CWD)/patches/*.patch); do \ echo "Applying $$patch"; \ cd $(pd_src)/src/ && patch -p0 -R < $$patch; \ done diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout index 7d31735c..2971545c 100644 --- a/packages/Makefile.buildlayout +++ b/packages/Makefile.buildlayout @@ -146,9 +146,12 @@ PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' ) PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION $(pd_src)/src/m_pd.h | \ sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' ) - -PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) - +PD_TEST_VERSION := $(shell grep PD_TEST_VERSION $(pd_src)/src/m_pd.h | \ + sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' ) +PD_VERSION := $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) +ifneq ($(PD_TEST_VERSION),) + PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION) +endif # release version for this distro PACKAGE_VERSION = extended-test1 diff --git a/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch b/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch new file mode 100644 index 00000000..19b7b082 --- /dev/null +++ b/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch @@ -0,0 +1,113 @@ +? ChangeLog +? configure +Index: makefile.in +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/makefile.in,v +retrieving revision 1.9 +diff -u -w -r1.9 makefile.in +--- makefile.in 31 Dec 2005 20:55:25 -0000 1.9 ++++ makefile.in 27 Feb 2006 17:24:47 -0000 +@@ -62,6 +62,20 @@ + + GOBJ = $(GSRC:.c=.o) + ++# get version from m_pd.h to use in doc/1.manual/1.introduction.txt ++PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION m_pd.h | \ ++ sed 's|^.define *PD_MAJOR_VERSION *\([0-9]*\).*|\1|' ) ++PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION m_pd.h | \ ++ sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' ) ++PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION m_pd.h | \ ++ sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' ) ++PD_TEST_VERSION := $(shell grep PD_TEST_VERSION m_pd.h | \ ++ sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' ) ++PD_VERSION := $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) ++ifneq ($(PD_TEST_VERSION),) ++ PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION) ++endif ++ + # + # ------------------ targets ------------------------------------ + # +@@ -130,6 +144,7 @@ + + BINARYMODE=@binarymode@ + ++ABOUT_FILE=$(pddocdir)/1.manual/1.introduction.txt + install: all + install -d $(libpdbindir) + install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME) +@@ -149,6 +164,10 @@ + install -d $(pddocdir)/7.stuff/$$dir ; \ + install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \ + done ++ mv $(ABOUT_FILE) $(ABOUT_FILE).tmp ++ cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd version $(PD_VERSION)|' \ ++ > $(ABOUT_FILE) ++ rm $(ABOUT_FILE).tmp + cp -pr ../extra $(libpddir)/ + rm -f $(libpddir)/extra/*/*.o + install -d $(DESTDIR)$(includedir) +Index: s_inter.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v +retrieving revision 1.15 +diff -u -w -r1.15 s_inter.c +--- s_inter.c 31 Dec 2005 20:55:25 -0000 1.15 ++++ s_inter.c 27 Feb 2006 17:24:47 -0000 +@@ -85,7 +85,6 @@ + t_socketreceivefn sr_socketreceivefn; + }; + +-extern char pd_version[]; + extern int sys_guisetportnumber; + extern char sys_font[]; /* tb: typeface */ + +@@ -1245,8 +1244,7 @@ + #endif + sys_get_audio_apis(buf); + sys_get_midi_apis(buf2); +- sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2, +- sys_font); ++ sys_vgui("pdtk_pd_startup %s %s {%s}\n", buf, buf2, sys_font); + } + return (0); + +Index: u_main.tk +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v +retrieving revision 1.18 +diff -u -w -r1.18 u_main.tk +--- u_main.tk 31 Dec 2005 20:55:25 -0000 1.18 ++++ u_main.tk 27 Feb 2006 17:24:48 -0000 +@@ -353,7 +353,6 @@ + proc menu_opentext {filename} { + global doc_number + global pd_guidir +- global pd_myversion + # global pd_font3 + set name [format ".help%d" $doc_number] + toplevel $name +@@ -367,8 +366,7 @@ + while {![eof $f]} { + set bigstring [read $f 1000] + regsub -all PD_BASEDIR $bigstring $pd_guidir bigstring2 +- regsub -all PD_VERSION $bigstring2 $pd_myversion bigstring3 +- $name.text insert end $bigstring3 ++ $name.text insert end $bigstring2 + } + close $f + set doc_number [expr $doc_number + 1] +@@ -3229,10 +3227,9 @@ + # font sizes 8, 10, 12, 14, 16, and 24. + + # tb: user defined typefaces +-proc pdtk_pd_startup {version apilist midiapilist fontname} { +-# puts stderr [concat $version $apilist $fontname] +- global pd_myversion pd_apilist pd_midiapilist +- set pd_myversion $version ++proc pdtk_pd_startup {apilist midiapilist fontname} { ++# puts stderr [concat $apilist $midiapilist $fontname] ++ global pd_apilist pd_midiapilist + set pd_apilist $apilist + set pd_midiapilist $midiapilist + global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7 -- cgit v1.2.1